projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70008aa
)
tun: orphan frags on xmit
author
Michael S. Tsirkin
<mst@redhat.com>
Fri, 20 Jul 2012 09:23:14 +0000
(09:23 +0000)
committer
David S. Miller
<davem@davemloft.net>
Sun, 22 Jul 2012 19:39:33 +0000
(12:39 -0700)
tun xmit is actually receive of the internal tun
socket. Orphan the frags same as we do for normal rx path.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/tun.c
b/drivers/net/tun.c
index f3a454c3295a7d2bf1839550302d908ee144d786..b95a7f44a6d8dff4c62db9bfd814ce7c65111881 100644
(file)
--- a/
drivers/net/tun.c
+++ b/
drivers/net/tun.c
@@
-416,6
+416,8
@@
static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
/* Orphan the skb - required as we might hang on to it
* for indefinite time. */
+ if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
+ goto drop;
skb_orphan(skb);
/* Enqueue packet */