From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752952AbZKHNHW (ORCPT ); Sun, 8 Nov 2009 08:07:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752811AbZKHNHV (ORCPT ); Sun, 8 Nov 2009 08:07:21 -0500 Received: from hera.kernel.org ([140.211.167.34]:59131 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750896AbZKHNHT (ORCPT ); Sun, 8 Nov 2009 08:07:19 -0500 Date: Sun, 8 Nov 2009 13:06:53 GMT From: tip-bot for Cyrill Gorcunov Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, yinghai@kernel.org, gorcunov@openvz.org, rusty@rustcorp.com.au, tglx@linutronix.de, mingo@elte.hu Reply-To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, gorcunov@openvz.org, yinghai@kernel.org, rusty@rustcorp.com.au, tglx@linutronix.de, mingo@elte.hu In-Reply-To: <20091026202811.GD5321@lenovo> References: <20091026202811.GD5321@lenovo> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] irq: Do not attempt to create subdirectories if /proc/irq/ failed Message-ID: Git-Commit-ID: c82a43d40b93200a10a9fec0a489791e65e135ca X-Mailer: tip-git-log-daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c82a43d40b93200a10a9fec0a489791e65e135ca Gitweb: http://git.kernel.org/tip/c82a43d40b93200a10a9fec0a489791e65e135ca Author: Cyrill Gorcunov AuthorDate: Mon, 26 Oct 2009 23:28:11 +0300 Committer: Ingo Molnar CommitDate: Sun, 8 Nov 2009 13:14:22 +0100 irq: Do not attempt to create subdirectories if /proc/irq/ failed If a parent directory (ie /proc/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 Cc: Rusty Russell Cc: Yinghai Lu LKML-Reference: <20091026202811.GD5321@lenovo> Signed-off-by: Ingo Molnar --- 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//smp_affinity */