Re: [PATCH] fix rmmod sbp2 hang in 2.6.7

From: Russell King
Date: Wed Jul 14 2004 - 04:25:51 EST


On Wed, Jul 14, 2004 at 05:11:07PM +0800, Hugang wrote:
> On Wed, 14 Jul 2004 16:13:57 +0800
> Hugang <hugang@xxxxxxxxxxxx> wrote:
> | On Wed, 14 Jul 2004 11:48:54 +0800
> | Hugang <hugang@xxxxxxxxxxxx> wrote:
> |
> ....
> | Sorry, the above patch, can't fix rmmod sbp2 complete,I still got hang when
> | rmmod sbp2 in my PowerBook G4 sometimes.
> |
>
> This new patch can complete fix the bug. That's really hack. Any comment are
> welcome.

This down+up prevents drivers from being unloaded until there are no
references to their struct device_driver. By removing this, you open
the very real possibility for an oops to occur.

If you're waiting inside that function for the last reference to be
dropped, the real question is why you still have references to it.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/