[patch 07/31] IA64: fix NULL pointer in ia64/irq_chip-mask/unmask function

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <stable@...>
Cc: Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, <torvalds@...>, <akpm@...>, <alan@...>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>, Tony Luck <tony.luck@...>
Date: Monday, March 19, 2007 - 5:38 pm

-stable review patch.  If anyone has any objections, please let us know.

------------------

From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

[IA64] fix NULL pointer in ia64/irq_chip-mask/unmask function

This patch fixes boot failure because irq_desc->mask() is NULL.

- Added mask/unmask functions to ia64's irq desc function table.
- rename hw_interrupt_type to irq_chip. hw_interrupt_type is old name.
- Tony: Added same change to arch/ia64/sn/kernel/irq.c as pointed out
  by Eric Biederman ... mask/unmask functions there can be no-op.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/ia64/kernel/iosapic.c |    8 ++++++--
 arch/ia64/sn/kernel/irq.c  |   14 +++++++++++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -446,7 +446,7 @@ iosapic_end_level_irq (unsigned int irq)
 #define iosapic_disable_level_irq	mask_irq
 #define iosapic_ack_level_irq		nop
 
-struct hw_interrupt_type irq_type_iosapic_level = {
+struct irq_chip irq_type_iosapic_level = {
 	.name =		"IO-SAPIC-level",
 	.startup =	iosapic_startup_level_irq,
 	.shutdown =	iosapic_shutdown_level_irq,
@@ -454,6 +454,8 @@ struct hw_interrupt_type irq_type_iosapi
 	.disable =	iosapic_disable_level_irq,
 	.ack =		iosapic_ack_level_irq,
 	.end =		iosapic_end_level_irq,
+	.mask =		mask_irq,
+	.unmask =	unmask_irq,
 	.set_affinity =	iosapic_set_affinity
 };
 
@@ -493,7 +495,7 @@ iosapic_ack_edge_irq (unsigned int irq)
 #define iosapic_disable_edge_irq	nop
 #define iosapic_end_edge_irq		nop
 
-struct hw_interrupt_type irq_type_iosapic_edge = {
+struct irq_chip irq_type_iosapic_edge = {
 	.name =		"IO-SAPIC-edge",
 	.startup =	iosapic_startup_edge_irq,
 	.shutdown =	iosapic_disable_edge_irq,
@@ -501,6 +503,8 @@ struct hw_interrupt_type irq_type_iosapi
 	.disable =	iosapic_disable_edge_irq,
 	.ack =		iosapic_ack_edge_irq,
 	.end =		iosapic_end_edge_irq,
+	.mask =		mask_irq,
+	.unmask =	unmask_irq,
 	.set_affinity =	iosapic_set_affinity
 };
 
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -205,7 +205,17 @@ static void sn_set_affinity_irq(unsigned
 		(void)sn_retarget_vector(sn_irq_info, nasid, slice);
 }
 
-struct hw_interrupt_type irq_type_sn = {
+static void
+sn_mask_irq(unsigned int irq)
+{
+}
+
+static void
+sn_unmask_irq(unsigned int irq)
+{
+}
+
+struct irq_chip irq_type_sn = {
 	.name		= "SN hub",
 	.startup	= sn_startup_irq,
 	.shutdown	= sn_shutdown_irq,
@@ -213,6 +223,8 @@ struct hw_interrupt_type irq_type_sn = {
 	.disable	= sn_disable_irq,
 	.ack		= sn_ack_irq,
 	.end		= sn_end_irq,
+	.mask		= sn_mask_irq,
+	.unmask		= sn_unmask_irq,
 	.set_affinity	= sn_set_affinity_irq
 };
 

-- 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/31] 2.6.20-stable review, Greg KH, (Mon Mar 19, 5:36 pm)
Re: [patch 00/31] 2.6.20-stable review, Gene Heskett, (Tue Mar 20, 1:15 am)
Re: [patch 00/31] 2.6.20-stable review, Greg KH, (Tue Mar 20, 11:52 am)
Re: [patch 00/31] 2.6.20-stable review, Gene Heskett, (Tue Mar 20, 3:59 pm)
Re: [patch 00/31] 2.6.20-stable review, Michael Krufky, (Tue Mar 20, 4:12 pm)
Re: [patch 00/31] 2.6.20-stable review, Gene Heskett, (Tue Mar 20, 11:04 pm)
Re: [patch 00/31] 2.6.20-stable review, Greg KH, (Tue Mar 20, 11:39 pm)
Re: [patch 00/31] 2.6.20-stable review, Gene Heskett, (Tue Mar 20, 11:53 pm)
Re: [patch 00/31] 2.6.20-stable review, Adrian Bunk, (Sun Mar 25, 12:30 pm)
Re: [patch 00/31] 2.6.20-stable review, Gene Heskett, (Tue Mar 20, 10:56 pm)
[patch 07/31] IA64: fix NULL pointer in ia64/irq_chip-mask/u..., Greg KH, (Mon Mar 19, 5:38 pm)
[patch 22/31] Fix sparc64 hugepage bugs, Greg KH, (Mon Mar 19, 5:40 pm)
Re: [patch 00/31] 2.6.20-stable review, Greg KH, (Mon Mar 19, 5:43 pm)
[patch 20/31] Fix ipv6 flow label inheritance, Greg KH, (Mon Mar 19, 5:40 pm)
[patch 15/31] fix MTIME_SEC_MAX on 32-bit, Greg KH, (Mon Mar 19, 5:39 pm)
Re: [patch 29/31] Input: i8042 - fix AUX IRQ delivery check, Dmitry Torokhov, (Mon Mar 19, 5:48 pm)
[patch 12/31] futex: PI state locking fix, Greg KH, (Mon Mar 19, 5:38 pm)
[patch 02/31] Fix rtm_to_ifaddr() error return., Greg KH, (Mon Mar 19, 5:37 pm)
[patch 09/31] mm: fix madvise infinine loop, Greg KH, (Mon Mar 19, 5:38 pm)
[patch 04/31] gdth: fix oops in gdth_copy_cmd(), Greg KH, (Mon Mar 19, 5:37 pm)