Re: [Bug #42707] Hang deconfiguring network interface (in shutdown) on 3.3-rc1

David Miller <davem-fT/PcQaiUtIeIZ0/[email protected]> Wed, 29 Feb 2012 13:46:56 -0500 (EST)
Newsgroups org.kernel.vger.kernel-testers,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
From: "Michael Chan" <mchan-dY08KVG/lbpWk0Htik3J/[email protected]>
Date: Wed, 29 Feb 2012 01:33:37 -0800

> Subject: [PATCH net] tg3: Fix tg3_get_stats64 for 5700 / 5701 devs
> 
> From: Matt Carlson <mcarlson-dY08KVG/lbpWk0Htik3J/[email protected]>
> 
> tg3_get_stats64() takes tp->lock when dealing with non-serdes bcm5700
> and bcm5701 devices.  However, functions that call tg3_halt() have
> already acquired tp->lock.  When tg3_get_stats64() is called in
> tg3_halt(), deadlock will occur.
> 
> This patch fixes the problem by separating the stat gathering code into
> a new tg3_get_nstats() function.  tg3_get_stats64() is recoded to call
> this function and take tp->lock.  The code that takes tp->lock in
> tg3_calc_crc_errors() has been removed.  Function signatures have been
> cleaned up too.
> 
> Signed-off-by: Matt Carlson <mcarlson-dY08KVG/lbpWk0Htik3J/[email protected]>
> Signed-off-by: Michael Chan <mchan-dY08KVG/lbpWk0Htik3J/[email protected]>

Applied, thanks everyone.