Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265317AbUFTVuI (ORCPT ); Sun, 20 Jun 2004 17:50:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265957AbUFTVuH (ORCPT ); Sun, 20 Jun 2004 17:50:07 -0400 Received: from fw.osdl.org ([65.172.181.6]:23770 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S265317AbUFTVuC (ORCPT ); Sun, 20 Jun 2004 17:50:02 -0400 Date: Sun, 20 Jun 2004 14:49:06 -0700 From: Andrew Morton To: Tom Vier Cc: linux-kernel@vger.kernel.org Subject: Re: 2.6.7: preempt + sysfs = BUG on ppc Message-Id: <20040620144906.095a4f93.akpm@osdl.org> In-Reply-To: <20040620153922.GA20103@zero> References: <20040620153922.GA20103@zero> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1195 Lines: 41 Tom Vier wrote: > > i forgot to exclude /sys when i ran rsync. this is easily reproducable. > > kernel BUG in fill_read_buffer at fs/sysfs/file.c:92! Please add this patch, then retest: --- 25/fs/sysfs/file.c~sysfs-overflow-debug 2004-06-20 14:44:44.272707136 -0700 +++ 25-akpm/fs/sysfs/file.c 2004-06-20 14:48:23.580367304 -0700 @@ -5,6 +5,8 @@ #include #include #include +#include + #include #include "sysfs.h" @@ -83,7 +85,13 @@ static int fill_read_buffer(struct file return -ENOMEM; count = ops->show(kobj,attr,buffer->page); - BUG_ON(count > PAGE_SIZE); + if (count > PAGE_SIZE) { + printk("%s: show handler overrun\n", __FUNCTION__); + printk("->show handler: 0x%p", ops->show); + print_symbol(" (%s)", (unsigned long)ops->show); + printk("\n"); + BUG(); + } if (count >= 0) buffer->count = count; else _ - 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/