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.
--