From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722Ab0DUE4Y (ORCPT ); Wed, 21 Apr 2010 00:56:24 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:53791 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780Ab0DUE4W (ORCPT ); Wed, 21 Apr 2010 00:56:22 -0400 From: "Rafael J. Wysocki" To: michael@ellerman.id.au Subject: Re: [Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316 Date: Wed, 21 Apr 2010 06:57:18 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.34-rc4-rjw; KDE/4.3.5; x86_64; ; ) Cc: Alexey Dobriyan , Christian Kujau , Linux Kernel Mailing List , linuxppc-dev@ozlabs.org, schwab@linux-m68k.org, Kernel Testers List , Maciej Rutecki References: <20100421155547.GA4222@x200> <1271809299.13262.6.camel@concordia> In-Reply-To: <1271809299.13262.6.camel@concordia> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Message-Id: <201004210657.18864.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 21 April 2010, Michael Ellerman wrote: > On Wed, 2010-04-21 at 18:55 +0300, Alexey Dobriyan wrote: > > On Tue, Apr 20, 2010 at 10:18:18PM +1000, Michael Ellerman wrote: > > > On Mon, 2010-04-19 at 23:45 -0700, Christian Kujau wrote: > > > --- a/fs/proc/proc_devtree.c > > > +++ b/fs/proc/proc_devtree.c > > > @@ -175,6 +175,24 @@ retry: > > > return fixed_name; > > > } > > > > > > +static const char *unslash_name(const char *name) > > > +{ > > > + char *p, *fixed_name; > > > + > > > + fixed_name = kstrdup(name); > > > + if (!fixed_name) { > > > + printk(KERN_ERR "device-tree: Out of memory trying to unslash " > > > + "name \"%s\"\n", name); > > > + return name; > > > + } > > > + > > > + p = fixed_name; > > > + while ((p = strstr(p, "/"))) > > > + *p++ = '_'; > > > > This is wasteful. :-) > > Whatever, patches welcome :) > > > Also, I hope we won't spit message every time allocation fail. > > We do. Your system is mostly hosed anyway, but feel free to rate limit > it or something. OK Is anyone going to post a clean patch for that with a sign-off? Rafael From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ogre.sisk.pl (ogre.sisk.pl [217.79.144.158]) by ozlabs.org (Postfix) with ESMTP id BE597B7CFA for ; Wed, 21 Apr 2010 15:14:24 +1000 (EST) From: "Rafael J. Wysocki" To: michael@ellerman.id.au Subject: Re: [Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316 Date: Wed, 21 Apr 2010 06:57:18 +0200 References: <20100421155547.GA4222@x200> <1271809299.13262.6.camel@concordia> In-Reply-To: <1271809299.13262.6.camel@concordia> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-2" Message-Id: <201004210657.18864.rjw@sisk.pl> Cc: Christian Kujau , Linux Kernel Mailing List , linuxppc-dev@ozlabs.org, schwab@linux-m68k.org, Kernel Testers List , Alexey Dobriyan , Maciej Rutecki List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wednesday 21 April 2010, Michael Ellerman wrote: > On Wed, 2010-04-21 at 18:55 +0300, Alexey Dobriyan wrote: > > On Tue, Apr 20, 2010 at 10:18:18PM +1000, Michael Ellerman wrote: > > > On Mon, 2010-04-19 at 23:45 -0700, Christian Kujau wrote: > > > --- a/fs/proc/proc_devtree.c > > > +++ b/fs/proc/proc_devtree.c > > > @@ -175,6 +175,24 @@ retry: > > > return fixed_name; > > > } > > > > > > +static const char *unslash_name(const char *name) > > > +{ > > > + char *p, *fixed_name; > > > + > > > + fixed_name = kstrdup(name); > > > + if (!fixed_name) { > > > + printk(KERN_ERR "device-tree: Out of memory trying to unslash " > > > + "name \"%s\"\n", name); > > > + return name; > > > + } > > > + > > > + p = fixed_name; > > > + while ((p = strstr(p, "/"))) > > > + *p++ = '_'; > > > > This is wasteful. :-) > > Whatever, patches welcome :) > > > Also, I hope we won't spit message every time allocation fail. > > We do. Your system is mostly hosed anyway, but feel free to rate limit > it or something. OK Is anyone going to post a clean patch for that with a sign-off? Rafael From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [Bug #15589] 2.6.34-rc1: Badness at fs/proc/generic.c:316 Date: Wed, 21 Apr 2010 06:57:18 +0200 Message-ID: <201004210657.18864.rjw@sisk.pl> References: <20100421155547.GA4222@x200> <1271809299.13262.6.camel@concordia> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1271809299.13262.6.camel@concordia> Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: Text/Plain; charset="us-ascii" To: michael-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org Cc: Alexey Dobriyan , Christian Kujau , Linux Kernel Mailing List , linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, schwab-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org, Kernel Testers List , Maciej Rutecki On Wednesday 21 April 2010, Michael Ellerman wrote: > On Wed, 2010-04-21 at 18:55 +0300, Alexey Dobriyan wrote: > > On Tue, Apr 20, 2010 at 10:18:18PM +1000, Michael Ellerman wrote: > > > On Mon, 2010-04-19 at 23:45 -0700, Christian Kujau wrote: > > > --- a/fs/proc/proc_devtree.c > > > +++ b/fs/proc/proc_devtree.c > > > @@ -175,6 +175,24 @@ retry: > > > return fixed_name; > > > } > > > > > > +static const char *unslash_name(const char *name) > > > +{ > > > + char *p, *fixed_name; > > > + > > > + fixed_name = kstrdup(name); > > > + if (!fixed_name) { > > > + printk(KERN_ERR "device-tree: Out of memory trying to unslash " > > > + "name \"%s\"\n", name); > > > + return name; > > > + } > > > + > > > + p = fixed_name; > > > + while ((p = strstr(p, "/"))) > > > + *p++ = '_'; > > > > This is wasteful. :-) > > Whatever, patches welcome :) > > > Also, I hope we won't spit message every time allocation fail. > > We do. Your system is mostly hosed anyway, but feel free to rate limit > it or something. OK Is anyone going to post a clean patch for that with a sign-off? Rafael