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

From: Arne Caspari
Date: Sat Dec 11 2004 - 16:36:00 EST


Russell King wrote:

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,

Ah, now I understand that thing. Reading the comments again, I should have seen the reason for this earlier.

I am sorry I can not test that patch since unloading of the modules I am currently testing blocks anyway. This makes it very hard to test the patch :-( and currently this was the reason why I was going to this.

Sorry if I caused any inconvenience.

/Arne


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