Bug 14925 - sky2 panic under load
sky2 panic under load
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Network
All Linux
: P1 normal
Assigned To: drivers_network@kernel-bugs.osdl.org
:
Depends on:
Blocks: 14885
  Show dependency treegraph
 
Reported: 2009-12-29 00:17 UTC by Rafael J. Wysocki
Modified: 2010-01-24 21:51 UTC (History)
0 users

See Also:
Kernel Version: 2.6.32.1
Tree: Mainline
Regression: Yes


Attachments
Proposed fix for sky2 panic under load issue (1.15 KB, patch)
2009-12-31 12:38 UTC, Mike McCormack
Details | Diff

Description Rafael J. Wysocki 2009-12-29 00:17:20 UTC
Subject    : sky2 panic in 2.6.32.1 under load
Submitter  : "Berck E. Nash" <flyboy@gmail.com>
Date       : 2009-12-21 23:52
References : http://marc.info/?l=linux-kernel&m=126143955730347&w=4
References : http://marc.info/?l=linux-kernel&m=126160893126548&w=4
Handled-By : Stephen Hemminger <shemminger@vyatta.com>
Notify-Also : Michael Breuer <mbreuer@majjas.com>
Notify-Also : Daniel Hazelton <dhazelton@enter.net>
Notify-Also : netdev@vger.kernel.org
Notify-Also : Berck Nash <flyboy@gmail.com>

This entry is being used for tracking a regression from 2.6.32.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Mike McCormack 2009-12-31 12:38:29 UTC
Created attachment 24391 [details]
Proposed fix for sky2 panic under load issue

Does this help?  (Sent to netdev mailing list too)

sky2_xmit_frame appears to be racing with sky2_restart.  The patch should make sure no call to sky2_xmit_frame is in progress after sky2_detach finishes.
Comment 2 Rafael J. Wysocki 2010-01-11 19:27:31 UTC
On Monday 11 January 2010, Berck E. Nash wrote:
> Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> > 
> > The following bug entry is on the current list of known regressions
> > from 2.6.32.  Please verify if it still should be listed and let me know
> > (either way).
> > 
> > 
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=14925
> > Subject		: sky2 panic under load
> > Submitter	: Berck E. Nash <flyboy@gmail.com>
> > Date		: 2009-12-21 23:52 (21 days old)
> > References	: http://marc.info/?l=linux-kernel&m=126143955730347&w=4
> > 		  http://marc.info/?l=linux-kernel&m=126160893126548&w=4
> > Handled-By	: Stephen Hemminger <shemminger@vyatta.com>
> 
> The patch attached to the bug report did not fix the problem, but I'm
> fairly certain that this one from Jarek P. did:
> 
> During TX timeout procedure dev could be awoken too early, e.g. by
> sky2_complete_tx() called from sky2_down(). Then sky2_xmit_frame()
> can run while buffers are freed causing an oops. This patch fixes it
> by adding netif_device_present() test in sky2_tx_complete().
> 
> Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=14925
> 
> With debugging by: Mike McCormack <mikem@ring3k.org>
> 
> Reported-by: Berck E. Nash <flyboy@gmail.com>
> Tested-by: Berck E. Nash <flyboy@gmail.com>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
> 
> ---
> 
>  drivers/net/sky2.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
> index 1c01b96..7650f73 100644
> --- a/drivers/net/sky2.c
> +++ b/drivers/net/sky2.c
> @@ -1844,7 +1844,8 @@ static void sky2_tx_complete(struct sky2_port
> *sky2, u16 done)
>  	sky2->tx_cons = idx;
>  	smp_mb();
> 
> -	if (tx_avail(sky2) > MAX_SKB_TX_LE + 4)
> +	/* Wake unless it's detached, and called e.g. from sky2_down() */
> +	if (tx_avail(sky2) > MAX_SKB_TX_LE + 4 && netif_device_present(dev))
>  		netif_wake_queue(dev);
>  }
Comment 3 Rafael J. Wysocki 2010-01-11 19:28:53 UTC
Patch : http://marc.info/?l=linux-netdev&m=126317022103883&w=4
Handled-By : Jarek Poplawski <jarkao2@gmail.com>
Comment 4 Rafael J. Wysocki 2010-01-24 21:51:34 UTC
Fixed by commit 9db2f1bec36805e57a003f7bb90e003815d96de8.

Note You need to log in before you can comment on or make changes to this bug.