ibm_newemac: Fix possible lockup on close
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 20 Nov 2007 03:50:46 +0000 (14:50 +1100)
committerJeff Garzik <jeff@garzik.org>
Sat, 24 Nov 2007 01:52:09 +0000 (20:52 -0500)
commit61dbcecef568450de954115180881bf2f68511bc
tree5cd9d0bff1ab065764230f870a1a48bbdb22142d
parent2ffbb8377c7a0713baf6644e285adc27a5654582
ibm_newemac: Fix possible lockup on close

It's a bad idea to call flush_scheduled_work from within a
netdev->stop because the linkwatch will occasionally take the
rtnl lock from a workqueue context, and thus that can deadlock.

This reworks things a bit in that area to avoid the problem.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/ibm_newemac/core.c
drivers/net/ibm_newemac/core.h