OpenVZ Forum


Home » Mailing lists » Devel » [PATCH RESEND 2/2] Fix some kallsyms_lookup() vs rmmod races
Re: [PATCH RESEND 2/2] Fix some kallsyms_lookup() vs rmmod races [message #11304 is a reply to message #11265] Sat, 17 March 2007 09:32 Go to previous message
Rusty Russell is currently offline  Rusty Russell
Messages: 10
Registered: March 2007
Junior Member
On Fri, 2007-03-16 at 14:44 +0300, Alexey Dobriyan wrote:
> [cc'ing folks whose proc files are affected]
>
> kallsyms_lookup() can call module_address_lookup() which iterates over
> modules list without module_mutex taken. Comment at the top of
> module_address_lookup() says it's for oops resolution so races are
> irrelevant, but in some cases it's reachable from regular code:

Yes, this changed somewhere along the way.

I prefer keeping the lock internal as much as possible, and have the
crash code use an __ variant of the function.

Note also that it might be an idea to have less-powerful accessors than
kallsyms_lookup...

Thanks!
Rusty.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH] p4-clockmod: switch to rdmsr_on_cpu/wrmsr_on_cpu
Next Topic: [PATCH RESEND 1/2] Race between cat /proc/kallsyms and rmmod
Goto Forum:
  


Current Time: Thu Jul 24 11:33:40 GMT 2025

Total time taken to generate the page: 0.18300 seconds