login
Header Space

 
 

Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rafael J. Wysocki <rjw@...>
Cc: Christian Kujau <lists@...>, LKML <linux-kernel@...>, Greg KH <greg@...>, Tejun Heo <htejun@...>, Kay Sievers <kay.sievers@...>
Date: Saturday, March 22, 2008 - 1:26 am

On Sat, 22 Mar 2008 02:26:34 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:


Is MD (ie: raid) in use?

If so, the below (already merged) patch should fix this crash.

If this patch does not fix it then please apply this debug patch:

http://userweb.kernel.org/~akpm/mmotm/broken-out/gregkh-driver-driver-core-debug-for-b...

then rerun the test.

Greg/Kay:

- why is this BUG_ON now triggering for people?

- we're killing people's machines.  Can we switch it to a
  WARN_ON()+fix-up-the-mess?


From: NeilBrown <neilb@suse.de>

Exposing the binary blob which is the md 'super-block' via sysfs
doesn't really fit with the sysfs model, and since commit

   8118a859dc7abd873193986c77a8d9bdb877adc8

it doesn't actually work at all (as the size of the blob is often one page).

(akpm: as in, fs/sysfs/file.c:fill_read_buffer() goes BUG)

So just remove it altogether.  It isn't really useful.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/md/md.c |   12 ------------
 1 file changed, 12 deletions(-)

diff -puN drivers/md/md.c~md-remove-the-super-sysfs-attribute-from-devices-in-an-md-array drivers/md/md.c
--- a/drivers/md/md.c~md-remove-the-super-sysfs-attribute-from-devices-in-an-md-array
+++ a/drivers/md/md.c
@@ -1864,17 +1864,6 @@ static struct rdev_sysfs_entry rdev_stat
 __ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store);
 
 static ssize_t
-super_show(mdk_rdev_t *rdev, char *page)
-{
-	if (rdev->sb_loaded && rdev->sb_size) {
-		memcpy(page, page_address(rdev->sb_page), rdev->sb_size);
-		return rdev->sb_size;
-	} else
-		return 0;
-}
-static struct rdev_sysfs_entry rdev_super = __ATTR_RO(super);
-
-static ssize_t
 errors_show(mdk_rdev_t *rdev, char *page)
 {
 	return sprintf(page, "%d\n", atomic_read(&rdev->corrected_errors));
@@ -2060,7 +2049,6 @@ __ATTR(size, S_IRUGO|S_IWUSR, rdev_size_
 
 static struct attribute *rdev_default_attrs[] = {
 	&rdev_state.attr,
-	&rdev_super.attr,
 	&rdev_errors.attr,
 	&rdev_slot.attr,
 	&rdev_offset.attr,
_

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Christian Kujau, (Fri Mar 21, 6:35 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Rafael J. Wysocki, (Fri Mar 21, 9:26 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Andrew Morton, (Sat Mar 22, 1:26 am)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Christian Kujau, (Sat Mar 22, 2:52 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Christian Kujau, (Sat Mar 22, 5:54 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Andrew Morton, (Sat Mar 22, 6:13 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Christian Kujau, (Sat Mar 22, 6:55 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Andrew Morton, (Sat Mar 22, 6:08 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Christian Kujau, (Sat Mar 22, 6:59 pm)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Greg KH, (Sat Mar 22, 2:20 am)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Andrew Morton, (Sat Mar 22, 2:26 am)
Re: 2.6.25-rc6: kernel BUG at fs/sysfs/file.c:89, Greg KH, (Sat Mar 22, 3:19 am)
speck-geostationary