[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1255611600-18534-1-git-send-email-remi@remlab.net>
Date: Thu, 15 Oct 2009 16:00:00 +0300
From: Rémi Denis-Courmont <remi@...lab.net>
To: netdev@...r.kernel.org
Cc: Rémi Denis-Courmont
<remi.denis-courmont@...ia.com>
Subject: [PATCH] Phonet: hold socket before giving it to sk_deliver_skb()
From: Rémi Denis-Courmont <remi.denis-courmont@...ia.com>
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@...ia.com>
---
net/phonet/socket.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index 8c84190..0412beb 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -112,8 +112,10 @@ void pn_deliver_sock_broadcast(struct net *net, struct sk_buff *skb)
continue;
clone = skb_clone(skb, GFP_ATOMIC);
- if (clone)
+ if (clone) {
+ sock_hold(sknode);
sk_receive_skb(sknode, clone, 0);
+ }
}
spin_unlock(&pnsocks.lock);
}
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists