Willem de Bruijn <willemdebruijn.ker...@gmail.com> wrote: >On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin <linmia...@huawei.com> 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 called > from pskb_carve > from pskb_extract > from rds_tcp_data_recv > >That receive path should not see any packets with zerocopy state associated. >
This works fine yet as its caller is limited. But we should take care of the skb_uarg refcount for future use. On the other hand, because this codepath should not see any packets with zerocopy state associated, then we should not call skb_orphan_frags here. Thanks. >> Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function") >> Signed-off-by: Miaohe Lin <linmia...@huawei.com>