Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-17 Thread Cornelia Huck
On Mon, 16 Apr 2007 17:02:46 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> wrote: > > No, only the core module has to stay. For example, every time you > > register an input device you pin input.ko as it is the module that > > provides ->release() method for input devices. You can freely unload > >

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-17 Thread Cornelia Huck
On Mon, 16 Apr 2007 15:38:52 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> wrote: > On Mon, 16 Apr 2007, Dmitry Torokhov wrote: > > Unfortunately all this "wait for refcount in module's exit" schemas > > lead to the following deadlock: > > > > rmmod my_module <

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-17 Thread Cornelia Huck
On Mon, 16 Apr 2007 15:38:52 -0400 (EDT), Alan Stern [EMAIL PROTECTED] wrote: On Mon, 16 Apr 2007, Dmitry Torokhov wrote: Unfortunately all this wait for refcount in module's exit schemas lead to the following deadlock: rmmod my_module

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-17 Thread Cornelia Huck
On Mon, 16 Apr 2007 17:02:46 -0400 (EDT), Alan Stern [EMAIL PROTECTED] wrote: No, only the core module has to stay. For example, every time you register an input device you pin input.ko as it is the module that provides -release() method for input devices. You can freely unload psmouse,

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Rusty Russell
On Tue, 2007-04-17 at 00:44 +0400, Alexey Dobriyan wrote: > On Mon, Apr 16, 2007 at 03:38:52PM -0400, Alan Stern wrote: > > 3. Change the module code so that rmmod can return _before_ the > > module is actually unloaded from memory (but after the module's > > exit routine has

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Alan Stern
On Mon, 16 Apr 2007, Dmitry Torokhov wrote: > > > What about 4: > > > > > > When registering an [k]object increment refcount of module that > > > provides ->release() function. > > > > > > That would normally require ->release function to be placed on > > > subsystem level to allow unloading

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Alexey Dobriyan
On Mon, Apr 16, 2007 at 03:38:52PM -0400, Alan Stern wrote: > 3. Change the module code so that rmmod can return _before_ the > module is actually unloaded from memory (but after the module's > exit routine has completed). This will lead to more problems. > For example,

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Greg KH <[EMAIL PROTECTED]> wrote: On Mon, Apr 16, 2007 at 03:03:16PM -0400, Dmitry Torokhov wrote: > On 4/16/07, Greg KH <[EMAIL PROTECTED]> wrote: > >On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: > >> On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> wrote: > >> >Hi,

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Greg KH <[EMAIL PROTECTED]> wrote: On Mon, Apr 16, 2007 at 03:47:13PM -0400, Dmitry Torokhov wrote: > On 4/16/07, Alan Stern <[EMAIL PROTECTED]> wrote: > >On Mon, 16 Apr 2007, Dmitry Torokhov wrote: > > > >> On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> wrote: > >> > Hi, > >> > > >>

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 03:03:16PM -0400, Dmitry Torokhov wrote: > On 4/16/07, Greg KH <[EMAIL PROTECTED]> wrote: > >On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: > >> On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> wrote: > >> >Hi, > >> > > >> >based on the discussion in "How

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 03:47:13PM -0400, Dmitry Torokhov wrote: > On 4/16/07, Alan Stern <[EMAIL PROTECTED]> wrote: > >On Mon, 16 Apr 2007, Dmitry Torokhov wrote: > > > >> On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> wrote: > >> > Hi, > >> > > >> > based on the discussion in "How should an exit

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Alan Stern <[EMAIL PROTECTED]> wrote: On Mon, 16 Apr 2007, Dmitry Torokhov wrote: > On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> wrote: > > Hi, > > > > based on the discussion in "How should an exit routine wait for > > release() callbacks?", I've cooked up some patches that make

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Alan Stern
On Mon, 16 Apr 2007, Dmitry Torokhov wrote: > On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> 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

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Greg KH <[EMAIL PROTECTED]> wrote: On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: > On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> wrote: > >Hi, > > > >based on the discussion in "How should an exit routine wait for > >release() callbacks?", I've cooked up some

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 07:36:19PM +0200, Cornelia Huck wrote: > Hi, > > based on the discussion in "How should an exit routine wait for > release() callbacks?" Wait, why is this needed anymore with the recent work in splitting sysfs away from the backing code? thanks, greg k-h - To

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: > On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> 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

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Cornelia Huck <[EMAIL PROTECTED]> 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

[Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Cornelia Huck
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

[Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Cornelia Huck
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

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Cornelia Huck [EMAIL PROTECTED] 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

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] 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

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 07:36:19PM +0200, Cornelia Huck wrote: Hi, based on the discussion in How should an exit routine wait for release() callbacks? Wait, why is this needed anymore with the recent work in splitting sysfs away from the backing code? thanks, greg k-h - To unsubscribe from

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Greg KH [EMAIL PROTECTED] wrote: On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] wrote: Hi, based on the discussion in How should an exit routine wait for release() callbacks?, I've cooked up some patches that make

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Alan Stern
On Mon, 16 Apr 2007, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] 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

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Alan Stern [EMAIL PROTECTED] wrote: On Mon, 16 Apr 2007, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] 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

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 03:03:16PM -0400, Dmitry Torokhov wrote: On 4/16/07, Greg KH [EMAIL PROTECTED] wrote: On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] wrote: Hi, based on the discussion in How should an exit routine

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Greg KH
On Mon, Apr 16, 2007 at 03:47:13PM -0400, Dmitry Torokhov wrote: On 4/16/07, Alan Stern [EMAIL PROTECTED] wrote: On Mon, 16 Apr 2007, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] wrote: Hi, based on the discussion in How should an exit routine wait for

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Greg KH [EMAIL PROTECTED] wrote: On Mon, Apr 16, 2007 at 03:47:13PM -0400, Dmitry Torokhov wrote: On 4/16/07, Alan Stern [EMAIL PROTECTED] wrote: On Mon, 16 Apr 2007, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] wrote: Hi, based on the discussion

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Dmitry Torokhov
On 4/16/07, Greg KH [EMAIL PROTECTED] wrote: On Mon, Apr 16, 2007 at 03:03:16PM -0400, Dmitry Torokhov wrote: On 4/16/07, Greg KH [EMAIL PROTECTED] wrote: On Mon, Apr 16, 2007 at 02:30:17PM -0400, Dmitry Torokhov wrote: On 4/16/07, Cornelia Huck [EMAIL PROTECTED] wrote: Hi, based on

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Alexey Dobriyan
On Mon, Apr 16, 2007 at 03:38:52PM -0400, Alan Stern wrote: 3. Change the module code so that rmmod can return _before_ the module is actually unloaded from memory (but after the module's exit routine has completed). This will lead to more problems. For example, what if

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Alan Stern
On Mon, 16 Apr 2007, Dmitry Torokhov wrote: What about 4: When registering an [k]object increment refcount of module that provides -release() function. That would normally require -release function to be placed on subsystem level to allow unloading individual devices.

Re: [Patch -mm 0/3] RFC: module unloading vs. release function

2007-04-16 Thread Rusty Russell
On Tue, 2007-04-17 at 00:44 +0400, Alexey Dobriyan wrote: On Mon, Apr 16, 2007 at 03:38:52PM -0400, Alan Stern wrote: 3. Change the module code so that rmmod can return _before_ the module is actually unloaded from memory (but after the module's exit routine has completed).