Re: [PATCH] drivers/base/driver.c : driver_unregister

From: Russell King
Date: Sat Dec 11 2004 - 14:13:31 EST


On Sat, Dec 11, 2004 at 07:54:32PM +0100, Arne Caspari wrote:
> I think the meaning of this patch is obvious: In driver_unregister, the
> bus_remove_driver function call was called outside the driver unload
> semaphore which should obviously protect it.

No. The semaphore is there to ensure that the function does not
return until the driver structure has a use count of zero. If you
tested your patch, you'd find that your change would deadlock on
the locked semaphore.

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