From: Alexey Dobriyan Date: Tue, 8 May 2007 07:28:43 +0000 (-0700) Subject: Fix race between cat /proc/*/wchan and rmmod et al X-Git-Tag: v2.6.22-rc1~686 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d65cb4a1718a072898c7a57a3bc61b2dc4bcd4d;p=pandora-kernel.git Fix race between cat /proc/*/wchan and rmmod et al kallsyms_lookup() can go iterating over modules list unprotected which is OK for emergency situations (oops), but not OK for regular stuff like /proc/*/wchan. Introduce lookup_symbol_name()/lookup_module_symbol_name() which copy symbol name into caller-supplied buffer or return -ERANGE. All copying is done with module_mutex held, so... Signed-off-by: Alexey Dobriyan Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed