net: fix sk_buff head without data area
authorPablo Neira <pablo@netfilter.org>
Mon, 3 Jun 2013 09:28:43 +0000 (09:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2013 00:26:49 +0000 (17:26 -0700)
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>

No differences found