Re: Registering for notifier chains in modules (was Linux 2.4.21-rc3- ipmi unresolved)

From: Corey Minyard (minyard@acm.org)
Date: Tue May 27 2003 - 12:12:28 EST


viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:

>On Tue, May 27, 2003 at 09:48:53AM -0500, Corey Minyard wrote:
>
>
>
>>>The user does have to do something. Every piece of code that calls
>>>notify_register has to set the new field to __THIS_MODULE. WIthout
>>>that field being set, you are no better off, the race still exists.
>>>
>>>
>>>
>>Why? The user doesn't have to set the field, you can let the
>>registration code do that. I have attached a patch as an example.
>>
>>
>
>How the devil would registration code figure out which module should
>be used?
>
>
You create a new call that also takes the module as a parameter, and
have the old call set the module owner to NULL. You export the new
call, and modules use it.

-Corey

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