lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1216851168.11027.343.camel@pasglop>
Date:	Thu, 24 Jul 2008 08:12:48 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Nate Case <ncase@...-inc.com>
Cc:	Sebastian Siewior <netdev@...breakpoint.cc>,
	netdev@...r.kernel.org, linuxppc-dev@...abs.org,
	Vitaly Bordug <vbordug@...mvista.com>,
	Li Yang <leoli@...escale.com>
Subject: Re: bug: mutex_lock() in interrupt conntext via phy_stop() in
	gianfar

On Mon, 2008-07-21 at 17:57 -0500, Nate Case wrote:
> On Fri, 2008-07-18 at 14:10 +0200, Sebastian Siewior wrote:
> > Commit 35b5f6b1a aka [PHYLIB: Locking fixes for PHY I/O potentially sleeping]
> > changed the phydev->lock from spinlock into a mutex. Now, the following
> > code path got triggered while NFS was unavailable:
> > 
> [snip]
> > |[  194.864733] BUG: sleeping function called from invalid context at /home/bigeasy/git/linux-2.6-powerpc/kernel/mutex.c:87
> > |[  194.875529] in_atomic():1, irqs_disabled():0
> > |[  194.879805] Call Trace:
> > |[  194.882250] [c0383d90] [c0006dd8] show_stack+0x48/0x184 (unreliable)
> > |[  194.888649] [c0383db0] [c001e938] __might_sleep+0xe0/0xf4
> > |[  194.894069] [c0383dc0] [c025a43c] mutex_lock+0x24/0x3c
> > |[  194.899234] [c0383de0] [c019005c] phy_stop+0x20/0x70
> > |[  194.904234] [c0383df0] [c018d4ec] stop_gfar+0x28/0xf4
> > |[  194.909305] [c0383e10] [c018e8c4] gfar_timeout+0x30/0x60
> > |[  194.914638] [c0383e20] [c01fe7c0] dev_watchdog+0xa8/0x144
> 
> Hmm..  I'm not sure what the best solution is to this.  Make the
> stop_gfar() call happen in a workqueue, and make a similar change to
> ucc_geth, fec_mpc52xx, and fs_enet? Modify phy_stop() to do the work in
> a workqueue conditionally if in interrupt context?  Between these two
> I'd lean toward the latter.
> 
> Does anyone have any better ideas?

Move the reset task to a workqueue.

Cheers,
Ben.


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ