Messages in this thread | | | Date | Tue, 9 Sep 2003 12:38:51 -0400 (EDT) | From | Zwane Mwaikambo <> | Subject | Re: [PATCH][2.6][CFT] rmmod floppy kills box fixes + default_device_remove |
| |
On Tue, 9 Sep 2003, Zwane Mwaikambo wrote:
> > So an empty release() function is the wrong thing to do in 99.99% of the > > situations in the kernel (the one exception seems to be the mca release > > function that recently got added for use when the bus is doing probing > > logic.) > > > > Does this help out? > > Yes thanks, i was confused over which memory references had to be > maintained.
Ok i had another look and i can see why you need a seperate release function, as we don't always do the kobject_cleanup immediately.
John and myself had a look and now we have the following race on ->release() function exit.
my_release_fn() { complete(&my_completion); <== [1] stall anywhere here, e.g. preempt/schedule }
cleanup_module() { wait_for_completion(&my_completion); <== [1] this task gets scheduled, free()s module text } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |