lkml.org 
[lkml]   [2010]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: linux-next: Tree for June 3
Date
On Thu, 3 Jun 2010 05:30:09 pm Dave Young wrote:
> Seems for some module drop reference of 0 in following code of init_module:
>
> /* Drop initial reference. */
> module_put(mod);

Thanks Dave, good bug report.

It was "module: refactor load_module part 4" where I initialized
the per-cpu pointer before allocating it:

static int module_unload_init(struct module *mod)
{
...
/* Hold reference count during initialization. */
__this_cpu_write(mod->refptr->incs, 1);
...
mod->refptr = alloc_percpu(struct module_ref);
...

This also explains Stephen's crash during module load (which was more
expected since refptr is NULL, though percpu ptrs don't work that way).

I've fixed it (by reversing the order of those lines) for tomorrow's
linux-next.

Thanks!
Rusty.


\
 
 \ /
  Last update: 2010-06-03 14:55    [W:0.061 / U:1.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site