On Tue, 3 Oct 2006 16:18:35 +0100 (BST) "Maciej W. Rozycki" <[EMAIL PROTECTED]> wrote:
> > 2. The driver uses schedule_work() for handling interrupts, but does not > make sure any pending work scheduled thus has been completed before > driver's structures get freed from memory. This is especially > important as interrupts may keep arriving if the line is shared with > another PHY. > > The solution is to ignore phy_interrupt() calls if the reported device > has already been halted and calling flush_scheduled_work() from > phy_stop_interrupts() (but guarded with current_is_keventd() in case > the function has been called through keventd from the MAC device's > close call to avoid a deadlock on the netlink lock). > eww, hack. Also not module-friendly: WARNING: "current_is_keventd" [drivers/net/phy/libphy.ko] undefined! Does this static void flush_cpu_workqueue(struct cpu_workqueue_struct *cwq) { if (cwq->thread == current) { /* * Probably keventd trying to flush its own queue. So simply run * it by hand rather than deadlocking. */ run_workqueue(cwq); not work??? - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html