Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992878AbXEBHzP (ORCPT ); Wed, 2 May 2007 03:55:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S2992880AbXEBHzP (ORCPT ); Wed, 2 May 2007 03:55:15 -0400 Received: from cantor.suse.de ([195.135.220.2]:58831 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992878AbXEBHzN (ORCPT ); Wed, 2 May 2007 03:55:13 -0400 Date: Wed, 2 May 2007 00:52:38 -0700 From: Greg KH To: Tilman Schmidt Cc: Kay Sievers , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nick Piggin , Hugh Dickins Subject: Re: 2.6.21-rc7-mm2 crash: Eeek! page_mapcount(page) went negative! (-1) Message-ID: <20070502075238.GA9083@suse.de> References: <20070425225716.8e9b28ca.akpm@linux-foundation.org> <46338AEB.2070109@imap.cc> <20070428141024.887342bd.akpm@linux-foundation.org> <4636248E.7030309@imap.cc> <20070430112130.b64321d3.akpm@linux-foundation.org> <46364346.6030407@imap.cc> <20070430124638.10611058.akpm@linux-foundation.org> <46383742.9050503@imap.cc> <20070502001000.8460fb31.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070502001000.8460fb31.akpm@linux-foundation.org> User-Agent: Mutt/1.5.15 (2007-04-06) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2023 Lines: 71 On Wed, May 02, 2007 at 12:10:00AM -0700, Andrew Morton wrote: > On Wed, 02 May 2007 09:01:22 +0200 Tilman Schmidt wrote: > > > Am 30.04.2007 21:46 schrieb Andrew Morton: > > > Not really - everything's tangled up. A bisection search on the > > > 2.6.21-rc7-mm2 driver tree would be the best bet. > > > > And the winner is: > > > > gregkh-driver-driver-core-make-uevent-environment-available-in-uevent-file.patch > > > > Reverting only that from 2.6.21-rc7-mm2 gives me a working kernel > > again. > > cripes. > > +static ssize_t show_uevent(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + struct kobject *top_kobj; > + struct kset *kset; > + char *envp[32]; > + char data[PAGE_SIZE]; > > That won't work too well with 4k stacks. Tilman, here's a patch, can you try this on top of your tree that dies? thanks, greg k-h --- drivers/base/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -252,7 +252,7 @@ static ssize_t show_uevent(struct device struct kobject *top_kobj; struct kset *kset; char *envp[32]; - char data[PAGE_SIZE]; + char *data = NULL; char *pos; int i; size_t count = 0; @@ -276,6 +276,10 @@ static ssize_t show_uevent(struct device if (!kset->uevent_ops->filter(kset, &dev->kobj)) goto out; + data = (char *)get_zeroed_page(GFP_KERNEL); + if (!data) + return -ENOMEM; + /* let the kset specific function add its keys */ pos = data; retval = kset->uevent_ops->uevent(kset, &dev->kobj, @@ -290,6 +294,7 @@ static ssize_t show_uevent(struct device count += sprintf(pos, "%s\n", envp[i]); } out: + free_page((unsigned long)data); return count; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/