All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] have sgi-gru driver call fs_initcall() if statically linked
@ 2008-11-24 20:53 Dean Nelson
  0 siblings, 0 replies; only message in thread
From: Dean Nelson @ 2008-11-24 20:53 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

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>

---

 drivers/misc/sgi-gru/grufile.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux/drivers/misc/sgi-gru/grufile.c
===================================================================
--- linux.orig/drivers/misc/sgi-gru/grufile.c	2008-11-21 11:44:02.000000000 -0600
+++ linux/drivers/misc/sgi-gru/grufile.c	2008-11-21 13:40:08.000000000 -0600
@@ -678,7 +678,11 @@ struct vm_operations_struct gru_vm_ops =
 	.fault		= gru_fault,
 };
 
+#ifndef MODULE
+fs_initcall(gru_init);
+#else
 module_init(gru_init);
+#endif
 module_exit(gru_exit);
 
 module_param(gru_options, ulong, 0644);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-24 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 20:53 [PATCH] have sgi-gru driver call fs_initcall() if statically linked Dean Nelson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.