net: add skb_to_full_sk() helper and use it in selinux_netlbl_skbuff_setsid()
authorEric Dumazet <edumazet@google.com>
Sun, 8 Nov 2015 18:54:07 +0000 (10:54 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Nov 2015 01:56:38 +0000 (20:56 -0500)
commit54abc686c2d111e98228943a7e1e51cc256e35d9
tree5ce71817a67798bdd4a669a63b110d83952c2feb
parentfb9a10d9d8552acf6f9dee2ecb2d047777821d8b
net: add skb_to_full_sk() helper and use it in selinux_netlbl_skbuff_setsid()

Generalize selinux_skb_sk() added in commit 212cd0895330
("selinux: fix random read in selinux_ip_postroute_compat()")
so that we can use it other contexts.

Use it right away in selinux_netlbl_skbuff_setsid()

Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_sock.h
security/selinux/hooks.c
security/selinux/netlabel.c