]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sgi-gru: call fs_initcall() if statically linked
authorDean Nelson <dcn@sgi.com>
Tue, 2 Dec 2008 14:06:01 +0000 (08:06 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Dec 2008 23:51:35 +0000 (15:51 -0800)
If xpc.ko and gru.ko are both statically linked into the kernel, then
xpc_init() can get called before gru_init() and make a call to one of the
gru's exported functions before the gru has initialized itself. The end
result is a NULL dereference.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/sgi-gru/grufile.c

index 5c027b6b4e5a7438815b290e09a99a0290bf55f5..6509838063924071cfdcfce11cf1d425b2ad170a 100644 (file)
@@ -481,7 +481,7 @@ struct vm_operations_struct gru_vm_ops = {
        .fault          = gru_fault,
 };
 
-module_init(gru_init);
+fs_initcall(gru_init);
 module_exit(gru_exit);
 
 module_param(gru_options, ulong, 0644);