diff options
author | Annie Li <Annie.li@oracle.com> | 2012-06-26 20:46:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-29 03:50:20 -0400 |
commit | 1e0b6eac6a150a35b45d019681b0021896354ae5 (patch) | |
tree | 97b778fcefabf41c3cefce8eea3b476d26ee7ad4 /drivers/net/xen-netback | |
parent | 7fa8ad6df71f4778b23e17b0106aaef02b518684 (diff) |
xen/netback: only non-freed SKB is queued into tx_queue
After SKB is queued into tx_queue, it will be freed if request_gop is NULL.
However, no dequeue action is called in this situation, it is likely that
tx_queue constains freed SKB. This patch should fix this issue, and it is
based on 3.5.0-rc4+.
This issue is found through code inspection, no bug is seen with it currently.
I run netperf test for several hours, and no network regression was found.
Signed-off-by: Annie Li <annie.li@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r-- | drivers/net/xen-netback/netback.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index f4a6fcaeffb1..682633bfe00f 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c | |||
@@ -1363,8 +1363,6 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk) | |||
1363 | INVALID_PENDING_IDX); | 1363 | INVALID_PENDING_IDX); |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | __skb_queue_tail(&netbk->tx_queue, skb); | ||
1367 | |||
1368 | netbk->pending_cons++; | 1366 | netbk->pending_cons++; |
1369 | 1367 | ||
1370 | request_gop = xen_netbk_get_requests(netbk, vif, | 1368 | request_gop = xen_netbk_get_requests(netbk, vif, |
@@ -1376,6 +1374,8 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk) | |||
1376 | } | 1374 | } |
1377 | gop = request_gop; | 1375 | gop = request_gop; |
1378 | 1376 | ||
1377 | __skb_queue_tail(&netbk->tx_queue, skb); | ||
1378 | |||
1379 | vif->tx.req_cons = idx; | 1379 | vif->tx.req_cons = idx; |
1380 | xen_netbk_check_rx_xenvif(vif); | 1380 | xen_netbk_check_rx_xenvif(vif); |
1381 | 1381 | ||