On Fri, Jun 28, 2002 at 04:47:57PM +0200, Soewono Effendi wrote:
> 
> And I think there must be some locking to protect
>         if (driver->owner)
>             __MOD_INC_USE_COUNT(driver->owner);
> and
>         if (driver->owner)
>             __MOD_DEC_USE_COUNT(driver->owner);
> 
> may be:
>       lock_kernel();
>         if (driver->owner)
>             __MOD_INC_USE_COUNT(driver->owner);
>       unlock_kernel();
> and
>       lock_kernel();
>         if (driver->owner)
>             __MOD_DEC_USE_COUNT(driver->owner);
>       unlock_kernel();
> 
> 
> 
> The goal is just to minimize the kernel locking time as much as
> possible, with the cost of size, I admit that.


Why do you think that the BKL or any lock is needed around the test and
set functions?

I agree module unloading is extreemly racy, but take a look at the
current threads on lkml for some ideas on how to solve this.

thanks,

greg k-h


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to