[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <530B4534.3000106@huawei.com>
Date: Mon, 24 Feb 2014 21:12:20 +0800
From: Qin Chuanyu <qinchuanyu@...wei.com>
To: <davem@...emloft.net>, "Michael S. Tsirkin" <mst@...hat.com>
CC: KVM list <kvm@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: [PATCH] bridge: orphan frags on local receive
with vhost tx zero_copy, guest nic might get hang when host reserving
skb in socket queue delivered by guest, the case has been solved in
tun, it also been needed by bridge. This could easily happened when a
LAST_ACK state tcp occuring between guest and host.
Signed-off-by: Chuanyu Qin <qinchuanyu@...wei.com>
---
net/bridge/br_input.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 28d5446..744e27a 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -117,6 +117,8 @@ int br_handle_frame_finish(struct sk_buff *skb)
br->dev->stats.multicast++;
} else if ((dst = __br_fdb_get(br, dest, vid)) &&
dst->is_local) {
+ if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
+ goto drop;
skb2 = skb;
/* Do not forward the packet since it's local. */
skb = NULL;
@@ -136,6 +138,7 @@ int br_handle_frame_finish(struct sk_buff *skb)
out:
return 0;
drop:
+ skb_tx_error(skb);
kfree_skb(skb);
goto out;
}
--
1.7.3.1.msysgit.0
--
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