summaryrefslogtreecommitdiff
path: root/net/appletalk
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>2014-07-07 23:22:50 +0300
committerWilly Tarreau <w@1wt.eu>2014-11-23 10:55:38 +0100
commita8a0b4eb46ebe3944cd59fa7e72aa93c768ed6ed (patch)
treeaffaeb62f64694514f60921e9e1d3cf09865ae5c /net/appletalk
parent540e9ab0a30cd3954352d3c80ff7d404b17ec0e1 (diff)
appletalk: Fix socket referencing in skb
[ Upstream commit 36beddc272c111689f3042bf3d10a64d8a805f93 ] Setting just skb->sk without taking its reference and setting a destructor is invalid. However, in the places where this was done, skb is used in a way not requiring skb->sk setting. So dropping the setting of skb->sk. Thanks to Eric Dumazet <eric.dumazet@gmail.com> for correct solution. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79441 Reported-by: Ed Martin <edman007@edman007.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'net/appletalk')
-rw-r--r--net/appletalk/ddp.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 5eae3606f32f..d44ac8dc11b8 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1469,8 +1469,6 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev,
goto drop;
/* Queue packet (standard) */
- skb->sk = sock;
-
if (sock_queue_rcv_skb(sock, skb) < 0)
goto drop;
@@ -1616,7 +1614,6 @@ static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
if (!skb)
return err;
- skb->sk = sk;
skb_reserve(skb, ddp_dl->header_length);
skb_reserve(skb, dev->hard_header_len);
skb->dev = dev;