* [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue
@ 2012-06-27 10:46 annie.li
2012-06-28 23:55 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: annie.li @ 2012-06-27 10:46 UTC (permalink / raw)
To: xen-devel, netdev, davem, Ian.Campbell, konrad.wilk
Cc: kurt.hackel, annie.li, Annie Li
From: Annie Li <Annie.li@oracle.com>
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>
---
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 f4a6fca..682633b 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)
INVALID_PENDING_IDX);
}
- __skb_queue_tail(&netbk->tx_queue, skb);
-
netbk->pending_cons++;
request_gop = xen_netbk_get_requests(netbk, vif,
@@ -1376,6 +1374,8 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
}
gop = request_gop;
+ __skb_queue_tail(&netbk->tx_queue, skb);
+
vif->tx.req_cons = idx;
xen_netbk_check_rx_xenvif(vif);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue
2012-06-27 10:46 [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue annie.li
@ 2012-06-28 23:55 ` David Miller
2012-06-29 7:23 ` Ian Campbell
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2012-06-28 23:55 UTC (permalink / raw)
To: annie.li; +Cc: xen-devel, netdev, Ian.Campbell, konrad.wilk, kurt.hackel
From: annie.li@oracle.com
Date: Wed, 27 Jun 2012 18:46:58 +0800
> From: Annie Li <Annie.li@oracle.com>
>
> 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>
I lack the expertiece necessary to properly review this, so I really
need a Xen expert to look this over.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue
2012-06-28 23:55 ` David Miller
@ 2012-06-29 7:23 ` Ian Campbell
2012-06-29 7:50 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2012-06-29 7:23 UTC (permalink / raw)
To: David Miller; +Cc: annie.li, xen-devel, netdev, konrad.wilk, kurt.hackel
On Fri, 2012-06-29 at 00:55 +0100, David Miller wrote:
> From: annie.li@oracle.com
> Date: Wed, 27 Jun 2012 18:46:58 +0800
>
> > From: Annie Li <Annie.li@oracle.com>
> >
> > 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>
>
> I lack the expertiece necessary to properly review this, so I really
> need a Xen expert to look this over.
Sorry, I put it to one side waiting for the repost to netdev and then
forgot about it...
Yes, this change looks good to me:
Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue
2012-06-29 7:23 ` Ian Campbell
@ 2012-06-29 7:50 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2012-06-29 7:50 UTC (permalink / raw)
To: Ian.Campbell; +Cc: annie.li, xen-devel, netdev, konrad.wilk, kurt.hackel
From: Ian Campbell <Ian.Campbell@citrix.com>
Date: Fri, 29 Jun 2012 08:23:09 +0100
> On Fri, 2012-06-29 at 00:55 +0100, David Miller wrote:
>> From: annie.li@oracle.com
>> Date: Wed, 27 Jun 2012 18:46:58 +0800
>>
>> > From: Annie Li <Annie.li@oracle.com>
>> >
>> > 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>
>>
>> I lack the expertiece necessary to properly review this, so I really
>> need a Xen expert to look this over.
>
> Sorry, I put it to one side waiting for the repost to netdev and then
> forgot about it...
>
> Yes, this change looks good to me:
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Thanks, applied to net-next.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue
2012-06-27 10:05 ` David Miller
@ 2012-06-27 10:51 ` ANNIE LI
0 siblings, 0 replies; 7+ messages in thread
From: ANNIE LI @ 2012-06-27 10:51 UTC (permalink / raw)
To: David Miller
Cc: kurt.hackel, xen-devel, linux-kernel, konrad.wilk, Ian.Campbell
Thanks, sent to netdev@vger.kernel.org just now.
Thanks
Annie
On 2012-6-27 18:05, David Miller wrote:
> Networking patches need to be sent to netdev@vger.kernel.org
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue
2012-06-27 9:45 annie.li
@ 2012-06-27 10:05 ` David Miller
2012-06-27 10:51 ` ANNIE LI
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2012-06-27 10:05 UTC (permalink / raw)
To: annie.li; +Cc: xen-devel, linux-kernel, Ian.Campbell, konrad.wilk, kurt.hackel
Networking patches need to be sent to netdev@vger.kernel.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue
@ 2012-06-27 9:45 annie.li
2012-06-27 10:05 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: annie.li @ 2012-06-27 9:45 UTC (permalink / raw)
To: xen-devel, linux-kernel, davem, Ian.Campbell, konrad.wilk
Cc: kurt.hackel, annie.li, Annie Li
From: Annie Li <Annie.li@oracle.com>
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>
---
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 f4a6fca..682633b 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)
INVALID_PENDING_IDX);
}
- __skb_queue_tail(&netbk->tx_queue, skb);
-
netbk->pending_cons++;
request_gop = xen_netbk_get_requests(netbk, vif,
@@ -1376,6 +1374,8 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
}
gop = request_gop;
+ __skb_queue_tail(&netbk->tx_queue, skb);
+
vif->tx.req_cons = idx;
xen_netbk_check_rx_xenvif(vif);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-29 7:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27 10:46 [Xen-devel] [PATCH 1/1] xen/netback: only non-freed SKB is queued into tx_queue annie.li
2012-06-28 23:55 ` David Miller
2012-06-29 7:23 ` Ian Campbell
2012-06-29 7:50 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2012-06-27 9:45 annie.li
2012-06-27 10:05 ` David Miller
2012-06-27 10:51 ` ANNIE LI
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.