caif: fix leaks and race in caif_queue_rcv_skb()
authorEric Dumazet <edumazet@google.com>
Fri, 17 Jul 2015 08:19:23 +0000 (10:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2015 07:02:44 +0000 (00:02 -0700)
commitb8a23e8d8e31abeda2f6cfa36a772414b2a86ffc
treeef089a2324ced0fd03bff823419458d6aa2a2ee4
parente3426ca7bc2957ee072f61360c2b81b4adb629ad
caif: fix leaks and race in caif_queue_rcv_skb()

1) If sk_filter() is applied, skb was leaked (not freed)
2) Testing SOCK_DEAD twice is racy :
   packet could be freed while already queued.
3) Remove obsolete comment about caching skb->len

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/caif_socket.c