lkml.org 
[lkml]   [2004]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch, 2.6.9-rc4-mm1] fix rmmod uhci_hcd oops

this patch fixes the rmmod oops reported by Paul Fulghum. It is caused
by the generic-irqs subsystem creating multiple /proc/irq/<nr>/<name>
directory entries with the same name which then confuses procfs upon
module removal.

Ingo

Signed-off-by: Ingo Molnar <mingo@elte.hu>

--- linux/kernel/irq/proc.c.orig
+++ linux/kernel/irq/proc.c
@@ -66,11 +66,24 @@ static int irq_affinity_write_proc(struc

#define MAX_NAMELEN 128

+static int name_unique(unsigned int irq, struct irqaction *new_action)
+{
+ struct irq_desc *desc = irq_desc + irq;
+ struct irqaction *action;
+
+ for (action = desc->action ; action; action = action->next)
+ if ((action != new_action) && action->name &&
+ !strcmp(new_action->name, action->name))
+ return 0;
+ return 1;
+}
+
void register_handler_proc(unsigned int irq, struct irqaction *action)
{
char name [MAX_NAMELEN];

- if (!irq_dir[irq] || action->dir || !action->name)
+ if (!irq_dir[irq] || action->dir || !action->name ||
+ !name_unique(irq, action))
return;

memset(name, 0, MAX_NAMELEN);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.579 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site