From: Cyrill Gorcunov Date: Mon, 26 Oct 2009 20:28:11 +0000 (+0300) Subject: irq: Do not attempt to create subdirectories if /proc/irq/ failed X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c82a43d40b93200a10a9fec0a489791e65e135ca;p=linux-beck.git irq: Do not attempt to create subdirectories if /proc/irq/ failed If a parent directory (ie /proc/irq/) could not be created we should not attempt to create subdirectories. Otherwise it would lead that "smp_affinity" and "spurious" entries are may be registered under /proc root instead of a proper place. Signed-off-by: Cyrill Gorcunov Cc: Rusty Russell Cc: Yinghai Lu LKML-Reference: <20091026202811.GD5321@lenovo> Signed-off-by: Ingo Molnar --- diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 692363dd591f..dfef5b9f3845 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -214,6 +214,8 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc) /* create /proc/irq/1234 */ desc->dir = proc_mkdir(name, root_irq_dir); + if (!desc->dir) + return; #ifdef CONFIG_SMP /* create /proc/irq//smp_affinity */