From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Yinghai Lu <yinghai@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -tip] irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
Date: Mon, 26 Oct 2009 23:28:11 +0300 [thread overview]
Message-ID: <20091026202811.GD5321@lenovo> (raw)
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 */
next reply other threads:[~2009-10-26 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 20:28 Cyrill Gorcunov [this message]
2009-11-08 13:06 ` [tip:irq/core] irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed tip-bot for Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091026202811.GD5321@lenovo \
--to=gorcunov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox