From: Alexey Dobriyan Date: Tue, 8 May 2007 07:28:39 +0000 (-0700) Subject: Fix race between rmmod and cat /proc/kallsyms X-Git-Tag: v2.6.22-rc1~688 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea07890a680273b25127129fb555aac0d9324bea;p=pandora-kernel.git Fix race between rmmod and cat /proc/kallsyms module_get_kallsym() leaks "struct module *" outside of module_mutex which is no-no, because module can dissapear right after mutex unlock. Copy all needed information from inside module_mutex into caller-supplied space. [bunk@stusta.de: is_exported() can now become static] Signed-off-by: Alexey Dobriyan Cc: Rusty Russell Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed