public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Stop ARM boards crashing when CUPS is loaded - 2.6.35-rc5
@ 2010-07-13 14:05 Lee Jones
  2010-07-15 20:02 ` Andrew Morton
  0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2010-07-13 14:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

>From 219005d9522043bc42ddb51d59688959eed0d443 Mon Sep 17 00:00:00 2001
From: Lee Jones <lee.jones@canonical.com>
Date: Tue, 13 Jul 2010 15:02:17 +0100
Subject: [PATCH] UBUNTU: [Upstream] Stop ARM boards crashing when CUPS is loaded

BugLink: http://bugs.launchpad.net/bugs/601226

When CUPS loads, it tries to load several drivers that it may need.
When one of these drivers, specifically parport_pc is loaded on ARM
based systems, it causes a segmentation fault as the ISA addresses
which are attempted are not writable on non-PC based architectures.
This code prevents ISA addresses from being attempted except on x86.

Signed-off-by: Lee Jones <lee.jones@canonical.com>
---
 arch/arm/include/asm/parport.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/parport.h b/arch/arm/include/asm/parport.h
index 26e94b0..a1874f8 100644
--- a/arch/arm/include/asm/parport.h
+++ b/arch/arm/include/asm/parport.h
@@ -9,10 +9,13 @@
 #ifndef __ASMARM_PARPORT_H
 #define __ASMARM_PARPORT_H
 
-static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
 static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
 {
-	return parport_pc_find_isa_ports (autoirq, autodma);
+/* parport_pc_find_isa_ports uses direct register addresses which are
+ * only correct on x86 architectures. This may have undesirable
+ * consequences (including segfaults) when used on other architectures.
+ */
+	return 0;
 }
 
 #endif /* !(_ASMARM_PARPORT_H) */
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-07-26 22:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13 14:05 [PATCH] Stop ARM boards crashing when CUPS is loaded - 2.6.35-rc5 Lee Jones
2010-07-15 20:02 ` Andrew Morton
2010-07-15 20:06   ` Russell King - ARM Linux
2010-07-16  9:08     ` Lee Jones
2010-07-16  9:20       ` Russell King - ARM Linux
2010-07-16  9:32         ` Lee Jones
2010-07-16 11:12           ` Lee Jones
2010-07-26 22:26             ` Greg KH
2010-07-16 16:23           ` Milton Miller
2010-07-16 16:42             ` Lee Jones
2010-07-16 19:38               ` Milton Miller
2010-07-16 20:54                 ` Russell King - ARM Linux
2010-07-16  9:37       ` Martin Michlmayr
2010-07-16 13:27         ` Woody Suwalski

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