git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
phonet: properly unshare skbs in phonet_rcv()
[pandora-kernel.git]
/
net
/
phonet
/
af_phonet.c
diff --git
a/net/phonet/af_phonet.c
b/net/phonet/af_phonet.c
index
d65f699
..
1e29f71
100644
(file)
--- a/
net/phonet/af_phonet.c
+++ b/
net/phonet/af_phonet.c
@@
-377,6
+377,10
@@
static int phonet_rcv(struct sk_buff *skb, struct net_device *dev,
struct sockaddr_pn sa;
u16 len;
+ skb = skb_share_check(skb, GFP_ATOMIC);
+ if (!skb)
+ return NET_RX_DROP;
+
/* check we have at least a full Phonet header */
if (!pskb_pull(skb, sizeof(struct phonethdr)))
goto out;