From patchwork Fri Sep 3 14:35:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 63685 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 93826B716B for ; Sat, 4 Sep 2010 00:34:48 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755535Ab0ICOer (ORCPT ); Fri, 3 Sep 2010 10:34:47 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:42182 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755467Ab0ICOer (ORCPT ); Fri, 3 Sep 2010 10:34:47 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 2468B24C087; Fri, 3 Sep 2010 07:35:04 -0700 (PDT) Date: Fri, 03 Sep 2010 07:35:03 -0700 (PDT) Message-Id: <20100903.073503.191401190.davem@davemloft.net> To: w.sang@pengutronix.de Cc: linux-ide@vger.kernel.org, bzolnier@gmail.com Subject: Re: WARNINGs because of ide-proc handling From: David Miller In-Reply-To: <20100903.053437.68134749.davem@davemloft.net> References: <20100902.151416.242137052.davem@davemloft.net> <20100903055328.GA11991@pengutronix.de> <20100903.053437.68134749.davem@davemloft.net> X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: David Miller Date: Fri, 03 Sep 2010 05:34:37 -0700 (PDT) > From: Wolfram Sang > Date: Fri, 3 Sep 2010 07:53:28 +0200 > >> >>> Thanks for your analysis and suggested patch, I'll take a look at this. >> >> Thanks for your help. If we can't find something, I'll just do a bisect this >> weekend. > > Frankly, at this point, I'm beginning suspect that the procfs stuff > simply never warned at some point in the past and that the IDE > code has had this problem for a while. I just confirmed that the procfs code only started warning on removal of non-present entries this past March, so basically the IDE code has silently had this problem of not actually creating any of it's procfs nodes for some time now. Wolfram I'll look into your patch some more and integrate it, thanks. commit 12bac0d9f4dbf3445a0319beee848d15fa32775e Author: Alexey Dobriyan Date: Fri Mar 5 13:44:00 2010 -0800 proc: warn on non-existing proc entries * warn if creation goes on to non-existent directory * warn if removal goes on from non-existing directory * warn if non-existing proc entry is removed Signed-off-by: Alexey Dobriyan Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Wolfram Sang --- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/proc/generic.c b/fs/proc/generic.c index ce2d954..08f4d71 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -312,8 +312,10 @@ static int __xlate_proc_name(const char *name, struct proc_dir_entry **ret, if (proc_match(len, cp, de)) break; } - if (!de) + if (!de) { + WARN(1, "name '%s'\n", name); return -ENOENT; + } cp += len + 1; } *residual = cp; @@ -818,8 +820,10 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent) } } spin_unlock(&proc_subdir_lock); - if (!de) + if (!de) { + WARN(1, "name '%s'\n", name); return; + } spin_lock(&de->pde_unload_lock); /*