projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
staging: ion: add dma_map_sg/dma_umap_sg to map_dma_buf
[firefly-linux-kernel-4.4.55.git]
/
net
/
phonet
/
af_phonet.c
diff --git
a/net/phonet/af_phonet.c
b/net/phonet/af_phonet.c
index 10d42f3220ab469b3e23050c99af72cb39c81452..f925753668a7f57495f8216c18c6102b940935e6 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;