OpenVZ Forum


Home » Mailing lists » Devel » [PATCH RESEND 1/2] Race between cat /proc/kallsyms and rmmod
Re: [PATCH v3] Race between cat /proc/kallsyms and rmmod [message #11332 is a reply to message #11328] Mon, 19 March 2007 15:20 Go to previous messageGo to previous message
Paulo Marques is currently offline  Paulo Marques
Messages: 7
Registered: March 2007
Junior Member
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.
>
> Steps to reproduce:
>
> modprobe/rmmod loop
> cat /proc/kallsyms >/dev/null loop
>
> Copy all needed info under module_mutex.
>
> NOTE: this patch keeps module_mutex static.

Yes, this patch fixes the "cat /proc/kallsyms" race without changing any
"external" interfaces, so I think it should go into mainline in any case.

Acked-by: Paulo Marques <pmarques@grupopie.com>

--
Paulo Marques - www.grupopie.com

"All I ask is a chance to prove that money can't make me happy."
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH RESEND 2/2] Fix some kallsyms_lookup() vs rmmod races
Next Topic: [RFC][PATCH 0/14] Enabling cloning of pid namespace
Goto Forum:
  


Current Time: Thu Jul 31 22:28:42 GMT 2025

Total time taken to generate the page: 0.52045 seconds