]> git.baikalelectronics.ru Git - kernel.git/commit
module: fix refptr allocation and release order
authorMasami Hiramatsu <mhiramat@redhat.com>
Mon, 16 Mar 2009 22:13:36 +0000 (18:13 -0400)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 17 Mar 2009 23:01:21 +0000 (09:31 +1030)
commitfcb0398635ef785ef3c432bc4f92ec8c0c346bde
tree225f75f803450c728d546c755f7398b102f8cf3d
parent169752d4aaa8869b10760464b11743582ea18b54
module: fix refptr allocation and release order

Impact: fix ref-after-free crash on failed module load

Fix refptr bug: Change refptr allocation and release order not to access a module
data structure pointed by 'mod' after freeing mod->module_core.
This bug will cause kernel panic(e.g. failed to find undefined symbols).

This bug was reported on systemtap bugzilla.
http://sources.redhat.com/bugzilla/show_bug.cgi?id=9927

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module.c