irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
PATCH 1/1 irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
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.
---
Please review. This is not critical even if will be failing at this point even at every call but better to be sure all goe fine. I hope I don't miss anything?
kernel/irq/proc.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/irq/proc.c +2 -0
@@ -214,6 +214,8 @@ void register_irq_proc(unsigned int irq,/* 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 */
Commit-ID: c82a43d40b93200a10a9fec0a489791e65e135ca Gitweb: http://git.kernel.org/tip/c82a43d40b93200a10a9fec0a489791e65e135ca Author: Cyrill Gorcunov <[email protected]> AuthorDate: Mon, 26 Oct 2009 23:28:11 +0300 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 8 Nov 2009 13:14:22 +0100
irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
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.
LKML-Reference: <20091026202811.GD5321@lenovo>
--- kernel/irq/proc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/irq/proc.c +2 -0
@@ -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 */