Skip to content

Commit

Permalink
irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
Browse files Browse the repository at this point in the history
If a parent directory (ie /proc/irq/<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 <gorcunov@openvz.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20091026202811.GD5321@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Nov 8, 2009
1 parent 663e695 commit c82a43d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/irq/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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/<irq>/smp_affinity */
Expand Down

0 comments on commit c82a43d

Please sign in to comment.