public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ensure XPC and XPNET are loaded on sn2 platforms only
@ 2005-09-08 15:46 Dean Nelson
  0 siblings, 0 replies; only message in thread
From: Dean Nelson @ 2005-09-08 15:46 UTC (permalink / raw)
  To: linux-ia64

These are SN2 only drivers.  They should have platform checks to prevent
them from doing evil stuff in GENERIC kernels.

Signed-off-by: Martin Hicks <mort@sgi.com>
Acked-by: Dean Nelson <dcn@sgi.com>


 arch/ia64/sn/kernel/xpc_main.c |    4 ++++
 arch/ia64/sn/kernel/xpnet.c    |    4 ++++
 2 files changed, 8 insertions(+)


Index: linux-2.6/arch/ia64/sn/kernel/xpc_main.c
=================================--- linux-2.6.orig/arch/ia64/sn/kernel/xpc_main.c	2005-09-08 06:58:26.134622631 -0500
+++ linux-2.6/arch/ia64/sn/kernel/xpc_main.c	2005-09-08 09:47:31.081587119 -0500
@@ -885,6 +885,10 @@
 	pid_t pid;
 
 
+	if (!ia64_platform_is("sn2")) {
+		return -ENODEV;
+	}
+
 	/*
 	 * xpc_remote_copy_buffer is used as a temporary buffer for bte_copy'ng
 	 * both a partition's reserved page and its XPC variables. Its size was
Index: linux-2.6/arch/ia64/sn/kernel/xpnet.c
=================================--- linux-2.6.orig/arch/ia64/sn/kernel/xpnet.c	2005-09-08 06:58:26.136575561 -0500
+++ linux-2.6/arch/ia64/sn/kernel/xpnet.c	2005-09-08 09:47:36.693330520 -0500
@@ -636,6 +636,10 @@
 	int result = -ENOMEM;
 
 
+	if (!ia64_platform_is("sn2")) {
+		return -ENODEV;
+	}
+
 	dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME);
 
 	/*

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

only message in thread, other threads:[~2005-09-08 15:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-08 15:46 [PATCH] ensure XPC and XPNET are loaded on sn2 platforms only Dean Nelson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox