Re: [PATCH] net: add missing skb_uarg refcount increment in pskb_carve_inside_header()

2020-08-15 Thread linmiaohe
Willem de Bruijn wrote: >On Fri, Aug 14, 2020 at 9:20 AM linmiaohe wrote: >> >> Willem de Bruijn wrote: >> >On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin wrote: >> >> >> >> If the skb is zcopied, we should increase the skb_uarg refcount >> >> before we involve skb_release_data(). See

Re: [PATCH] net: add missing skb_uarg refcount increment in pskb_carve_inside_header()

2020-08-14 Thread Willem de Bruijn
On Fri, Aug 14, 2020 at 9:20 AM linmiaohe wrote: > > Willem de Bruijn wrote: > >On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin wrote: > >> > >> If the skb is zcopied, we should increase the skb_uarg refcount before > >> we involve skb_release_data(). See pskb_expand_head() as a reference. > > >

Re: [PATCH] net: add missing skb_uarg refcount increment in pskb_carve_inside_header()

2020-08-14 Thread linmiaohe
Willem de Bruijn wrote: >On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin wrote: >> >> If the skb is zcopied, we should increase the skb_uarg refcount before >> we involve skb_release_data(). See pskb_expand_head() as a reference. > >Did you manage to observe a bug through this datapath in practice?

Re: [PATCH] net: add missing skb_uarg refcount increment in pskb_carve_inside_header()

2020-08-13 Thread Willem de Bruijn
On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin wrote: > > If the skb is zcopied, we should increase the skb_uarg refcount before we > involve skb_release_data(). See pskb_expand_head() as a reference. Did you manage to observe a bug through this datapath in practice? pskb_carve_inside_header is

[PATCH] net: add missing skb_uarg refcount increment in pskb_carve_inside_header()

2020-08-13 Thread Miaohe Lin
If the skb is zcopied, we should increase the skb_uarg refcount before we involve skb_release_data(). See pskb_expand_head() as a reference. Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function") Signed-off-by: Miaohe Lin --- net/core/skbuff.c | 2 ++ 1 file changed, 2 insertions(+)