[lkml]   [2007]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch -mm 0/3] RFC: module unloading vs. release function
On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote:
> On 4/16/07, Cornelia Huck <> wrote:
> >Hi,
> >
> >based on the discussion in "How should an exit routine wait for
> >release() callbacks?", I've cooked up some patches that make module
> >unload wait until the last reference for a kobject has been dropped.
> >This should plug the "release function in already deleted module" race;
> >however, if the last kobject_put() from the module containing the
> >release function is not in the module's exit function, there's still a
> >small window (not sure if and how to plug this).
> Unfortunately all this "wait for refcount in module's exit" schemas
> lead to the following deadlock:
> rmmod my_module < /path/to/some/file/incrementing/my/refcount

No, it should just return "module in use" as the reference count it
grabbed before rmmod is called.

But either way, that's just foolish to try to prevent that from failing


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-04-16 20:53    [W:0.216 / U:0.208 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site