]> git.baikalelectronics.ru Git - kernel.git/commit
net: really orphan skbs tied to closing sk
authorPaolo Abeni <pabeni@redhat.com>
Tue, 11 May 2021 08:35:21 +0000 (10:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 May 2021 20:48:58 +0000 (13:48 -0700)
commitc7f598edd078da82091f1c7226da64adfcdbc878
treed442e60d9f155abed803536c17afe7f8a0e9b930
parent86e2e903ced75a5e50e68027f7b1eec1b1f0a9c3
net: really orphan skbs tied to closing sk

If the owing socket is shutting down - e.g. the sock reference
count already dropped to 0 and only sk_wmem_alloc is keeping
the sock alive, skb_orphan_partial() becomes a no-op.

When forwarding packets over veth with GRO enabled, the above
causes refcount errors.

This change addresses the issue with a plain skb_orphan() call
in the critical scenario.

Fixes: f73cc5ba0737 ("net: let skb_orphan_partial wake-up waiters.")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c