[Devel] Re: [PATCH] Race between cat /proc/kallsyms and rmmod

Paulo Marques pmarques at grupopie.com
Wed Mar 14 05:55:09 PDT 2007


Alexey Dobriyan wrote:
> Iterating code of /proc/kallsyms calls module_get_kallsym() which grabs
> and drops module_mutex internally and returns "struct module *",
> module is removed, aforementioned "struct module *" is used in non-trivial
> way.
> So, grab module_mutex for entire operation like /proc/modules does.

I would still prefer the other solution to avoid exposing "module_mutex" 
outside of module.c like this :(

I'll try to send in a patch today for review.

-- 
Paulo Marques - www.grupopie.com

"As far as we know, our computer has never had an undetected error."
Weisert




More information about the Devel mailing list