Re: [PATCH] net: correct zerocopy refcnt with newly allocated UDP or RAW uarg

2020-08-15 Thread linmiaohe
Willem de Bruijn wrote: >On Fri, Aug 14, 2020 at 10:17 AM linmiaohe wrote: >> > >I don't think that can happen. > >The question is when this branch is false > >next = (u32)atomic_read(&sk->sk_zckey); >if ((u32)(uarg->id + uarg->len) == next) { > >I cannot come up w

Re: [PATCH] net: correct zerocopy refcnt with newly allocated UDP or RAW uarg

2020-08-14 Thread Willem de Bruijn
On Fri, Aug 14, 2020 at 10:17 AM linmiaohe wrote: > > Willem de Bruijn wrote: > >On Thu, Aug 13, 2020 at 1:59 PM Miaohe Lin wrote: > >> > >> The var extra_uref is introduced to pass the initial reference taken > >> in sock_zerocopy_alloc to the first generated skb. But now we may fail > >> to pa

Re: [PATCH] net: correct zerocopy refcnt with newly allocated UDP or RAW uarg

2020-08-14 Thread linmiaohe
Willem de Bruijn wrote: >On Thu, Aug 13, 2020 at 1:59 PM Miaohe Lin wrote: >> >> The var extra_uref is introduced to pass the initial reference taken >> in sock_zerocopy_alloc to the first generated skb. But now we may fail >> to pass the initial reference with newly allocated UDP or RAW uarg

Re: [PATCH] net: correct zerocopy refcnt with newly allocated UDP or RAW uarg

2020-08-13 Thread Willem de Bruijn
On Thu, Aug 13, 2020 at 1:59 PM Miaohe Lin wrote: > > The var extra_uref is introduced to pass the initial reference taken in > sock_zerocopy_alloc to the first generated skb. But now we may fail to pass > the initial reference with newly allocated UDP or RAW uarg when the skb is > zcopied. > > If

[PATCH] net: correct zerocopy refcnt with newly allocated UDP or RAW uarg

2020-08-13 Thread Miaohe Lin
The var extra_uref is introduced to pass the initial reference taken in sock_zerocopy_alloc to the first generated skb. But now we may fail to pass the initial reference with newly allocated UDP or RAW uarg when the skb is zcopied. If the skb is zcopied, we always set extra_uref to false. This is