[lkml]   [2008]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] configfs: module reference counting rules
On Mon, Jun 16, 2008 at 11:06:43AM -0700, Joel Becker wrote:
> > > Why can't mod_b provide a ->release() that does
> > > module_put(self)?
> >
> > Because this is simply wrong. Doing module_put(self) exposes the modules's
> > function to be run while another cpu unloads the module. Note how I solve this
> How so? As long as the module_put() is the last thing, you're
> fine. That said, we both have better solutions with our wrappered
> functions.

With a preemptible kernel, after module_put(self) the few assembly instructions
cleaning up the stack before returning to the caller can be called after the
memory allocated for the module has been freed. Which will make the kernel


Dr Louis Rilling Kerlabs
Skype: louis.rilling Batiment Germanium
Phone: (+33|0) 6 80 89 08 23 80 avenue des Buttes de Coesmes 35700 Rennes
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2008-06-16 20:17    [W:0.081 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site