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 <[EMAIL PROTECTED]> --- 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); ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel