summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy2013-04-17 08:46:59 +0200
committerDavid S. Miller2013-04-19 20:57:57 +0200
commit1298ca4671acb10310baa550ed044c553e3a3387 (patch)
tree4849ed23751cc2ab23c1c4c62f00d970639d0e7f /net
parentnet: add function to allocate sk_buff head without data area (diff)
downloadkernel-qcow2-linux-1298ca4671acb10310baa550ed044c553e3a3387.tar.gz
kernel-qcow2-linux-1298ca4671acb10310baa550ed044c553e3a3387.tar.xz
kernel-qcow2-linux-1298ca4671acb10310baa550ed044c553e3a3387.zip
netlink: don't orphan skb in netlink_trim()
Netlink doesn't account skbs to the sending socket, so the there's no need to orphan the skb before trimming it. Removing the skb_orphan() call is required for mmap'ed netlink, which uses a netlink specific skb destructor that must not be invoked before the final freeing of the skb. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netlink/af_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 978a61f7c87f..26779c24b1d4 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -851,7 +851,7 @@ static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
{
int delta;
- skb_orphan(skb);
+ WARN_ON(skb->sk != NULL);
delta = skb->end - skb->tail;
if (delta * 2 < skb->truesize)