All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
@ 2009-10-26 20:28 Cyrill Gorcunov
  2009-11-08 13:06 ` [tip:irq/core] " tip-bot for Cyrill Gorcunov
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2009-10-26 20:28 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner; +Cc: Rusty Russell, Yinghai Lu, LKML

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>
---

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(+)

Index: linux-2.6.git/kernel/irq/proc.c
=====================================================================
--- linux-2.6.git.orig/kernel/irq/proc.c
+++ linux-2.6.git/kernel/irq/proc.c
@@ -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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:irq/core] irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
  2009-10-26 20:28 [PATCH -tip] irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed Cyrill Gorcunov
@ 2009-11-08 13:06 ` tip-bot for Cyrill Gorcunov
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Cyrill Gorcunov @ 2009-11-08 13:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, yinghai, gorcunov, rusty, tglx, mingo

Commit-ID:  c82a43d40b93200a10a9fec0a489791e65e135ca
Gitweb:     http://git.kernel.org/tip/c82a43d40b93200a10a9fec0a489791e65e135ca
Author:     Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Mon, 26 Oct 2009 23:28:11 +0300
Committer:  Ingo Molnar <mingo@elte.hu>
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.

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>
---
 kernel/irq/proc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 692363d..dfef5b9 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/<irq>/smp_affinity */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-08 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-26 20:28 [PATCH -tip] irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed Cyrill Gorcunov
2009-11-08 13:06 ` [tip:irq/core] " tip-bot for Cyrill Gorcunov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.