Home
last modified time | relevance | path

Searched hist:ccaffff1 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/net/core/
H A Dskbuff.cccaffff1 Wed Aug 09 18:09:43 CDT 2017 Willem de Bruijn <willemb@google.com> sock: fix zerocopy panic in mem accounting

Only call mm_unaccount_pinned_pages when releasing a struct ubuf_info
that has initialized its field uarg->mmp.

Before this patch, a vhost-net with experimental_zcopytx can crash in

mm_unaccount_pinned_pages
sock_zerocopy_put
skb_zcopy_clear
skb_release_data

Only sock_zerocopy_alloc initializes this field. Move the unaccount
call from generic sock_zerocopy_put to its specific callback
sock_zerocopy_callback.

Fixes: a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY pages")
Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ccaffff1 Wed Aug 09 18:09:43 CDT 2017 Willem de Bruijn <willemb@google.com> sock: fix zerocopy panic in mem accounting

Only call mm_unaccount_pinned_pages when releasing a struct ubuf_info
that has initialized its field uarg->mmp.

Before this patch, a vhost-net with experimental_zcopytx can crash in

mm_unaccount_pinned_pages
sock_zerocopy_put
skb_zcopy_clear
skb_release_data

Only sock_zerocopy_alloc initializes this field. Move the unaccount
call from generic sock_zerocopy_put to its specific callback
sock_zerocopy_callback.

Fixes: a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY pages")
Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>