lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 8 Nov 2009 13:06:53 GMT
From:	tip-bot for Cyrill Gorcunov <gorcunov@...nvz.org>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	yinghai@...nel.org, gorcunov@...nvz.org, rusty@...tcorp.com.au,
	tglx@...utronix.de, mingo@...e.hu
Subject: [tip:irq/core] irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed

Commit-ID:  c82a43d40b93200a10a9fec0a489791e65e135ca
Gitweb:     http://git.kernel.org/tip/c82a43d40b93200a10a9fec0a489791e65e135ca
Author:     Cyrill Gorcunov <gorcunov@...nvz.org>
AuthorDate: Mon, 26 Oct 2009 23:28:11 +0300
Committer:  Ingo Molnar <mingo@...e.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@...nvz.org>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Yinghai Lu <yinghai@...nel.org>
LKML-Reference: <20091026202811.GD5321@...ovo>
Signed-off-by: Ingo Molnar <mingo@...e.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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists