From: Dean Nelson Date: Tue, 2 Dec 2008 14:06:01 +0000 (-0600) Subject: sgi-gru: call fs_initcall() if statically linked X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=026bde120a161d9035502a47dd311bd572f6d31f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git sgi-gru: call fs_initcall() if statically linked 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 5c027b6b4e5a..650983806392 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c @@ -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);