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 #11336 is a reply to message #11328] Mon, 19 March 2007 23:35 Go to previous message
Rusty Russell is currently offline  Rusty Russell
Messages: 10
Registered: March 2007
Junior Member
On Mon, 2007-03-19 at 17:33 +0300, 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.

Hi Alexey,

I like the patch, but I wonder if passing the lengths for the symbol
and module name is overkill? There are KSYM_NAME_LEN and
MODULE_NAME_LEN constants, after all, and we could just have the callers
use buffers of sufficient size. Simplifies the code and reduces
confusion if someone passes a small buffer and it gets surprisingly
truncated...

Thanks!
Rusty.
 
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 Nov 13 16:02:02 GMT 2025

Total time taken to generate the page: 0.18240 seconds