summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorPablo Neira2013-06-03 11:28:43 +0200
committerDavid S. Miller2013-06-05 02:26:49 +0200
commit5e71d9d77c07fa7d4c42287a177f7b738d0cd4b9 (patch)
tree143f0f3ea5dbebf7bee5e326c73002f36d87dbb3 /net/netlink
parenttg3: Add read dma workaround for 5720 (diff)
downloadkernel-qcow2-linux-5e71d9d77c07fa7d4c42287a177f7b738d0cd4b9.tar.gz
kernel-qcow2-linux-5e71d9d77c07fa7d4c42287a177f7b738d0cd4b9.tar.xz
kernel-qcow2-linux-5e71d9d77c07fa7d4c42287a177f7b738d0cd4b9.zip
net: fix sk_buff head without data area
Eric Dumazet spotted that we have to check skb->head instead of skb->data as skb->head points to the beginning of the data area of the skbuff. Similarly, we have to initialize the skb->head pointer, not skb->data in __alloc_skb_head. After this fix, netlink crashes in the release path of the sk_buff, so let's fix that as well. This bug was introduced in (0ebd0ac net: add function to allocate sk_buff head without data area). Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-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 12ac6b47a35c..d0b3dd60d386 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -747,7 +747,7 @@ static void netlink_skb_destructor(struct sk_buff *skb)
atomic_dec(&ring->pending);
sock_put(sk);
- skb->data = NULL;
+ skb->head = NULL;
}
#endif
if (skb->sk != NULL)