Re: Module loading/unloading and "The Stop Machine"

From: Andi Kleen
Date: Fri Feb 22 2008 - 06:54:10 EST


Max Krasnyanskiy <maxk@xxxxxxxxxxxx> writes:
>
> static struct module *load_module(void __user *umod,
> unsigned long len,
> const char __user *uargs)
> {
> ...
>
> /* Now sew it into the lists so we can get lockdep and oops
> * info during argument parsing. Noone should access us, since
> * strong_try_module_get() will fail. */
> stop_machine_run(__link_module, mod, NR_CPUS);
> ...
> }

Wow you found some really bad code. I bet it wouldn't be that
difficult to fix the code to allow oops safe list insertion
without using the big stop machine overkill hammer.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/