Skip to content

Commit

Permalink
sgi-gru: call fs_initcall() if statically linked
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dean Nelson authored and Linus Torvalds committed Dec 2, 2008
1 parent 7a0d794 commit 026bde1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/sgi-gru/grufile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 026bde1

Please sign in to comment.