module: refactor load_module part 4
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 5 Aug 2010 18:59:04 +0000 (12:59 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 5 Aug 2010 03:29:05 +0000 (12:29 +0930)
commit9f85a4bbb1cf56f65b3d065a5f88204a757f2325
tree28d674a40dcab0e0c31349736718993f1e9377d4
parent40dd2560ec2df21036db9ec8b971f92d98fd1969
module: refactor load_module part 4

Allocate references inside module_unload_init(), clean up inside
module_unload_free().

This version fixed to do allocation before __this_cpu_write, thanks to
bug reports from linux-next from Dave Young <hidave.darkstar@gmail.com>
and Stephen Rothwell <sfr@canb.auug.org.au>.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module.c