mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Wakko Warner <wakko@animx.eu.org>,
	linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: 2.6.24.3 bug in sysfs with md.
Date: Tue, 25 Mar 2008 14:52:46 +1100	[thread overview]
Message-ID: <18408.30478.519821.624319@notabene.brown> (raw)
In-Reply-To: message from Andrew Morton on Saturday March 22

On Saturday March 22, akpm@linux-foundation.org wrote:
> On Sat, 22 Mar 2008 18:25:31 -0400 Wakko Warner <wakko@animx.eu.org> wrote:
> 
> > I was poking around with the files laying in /sys/block/md*/md/dev-*/super
> > and found this bug (NOTE: I attempted to read the file 2 times):
> > 
> > [ 5591.212764] ------------[ cut here ]------------
> > [ 5591.212773] kernel BUG at /usr/src/linux/dist/2.6.24.3/fs/sysfs/file.c:126!
> 
> hm, I didn't know 2.6.24 was affected.

$ git describe 8118a859dc7abd873193986c77a8d9bdb877adc8
v2.6.24-rc3-412-g8118a85

Looks like everything since 2.6.24-rc3 is affected.

> 
> Neil, should we backport this?

Yes, I think that would be best.

Thanks,
NeilBrown

> 
> 
> From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
> To: git-commits-head@vger.kernel.org
> Subject: md: remove the 'super' sysfs attribute from devices in an 'md' array
> Date: 	Thu, 20 Mar 2008 02:59:10 GMT
> Sender: git-commits-head-owner@vger.kernel.org
> 
> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e82989d95cc46cc58622381eafa54f7428ee679
> Commit:     0e82989d95cc46cc58622381eafa54f7428ee679
> Parent:     43d8eac44f28d384d2377dcdd1407f51f79dda55
> Author:     NeilBrown <neilb@suse.de>
> AuthorDate: Wed Mar 19 17:00:44 2008 -0700
> Committer:  Linus Torvalds <torvalds@linux-foundation.org>
> CommitDate: Wed Mar 19 18:53:35 2008 -0700
> 
>     md: remove the 'super' sysfs attribute from devices in an 'md' array
>     
>     Exposing the binary blob which is the md 'super-block' via sysfs doesn't
>     really fit with the whole sysfs model, and ever since commit
>     8118a859dc7abd873193986c77a8d9bdb877adc8 ("sysfs: fix off-by-one error
>     in fill_read_buffer()") 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>
>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> ---
>  drivers/md/md.c |   12 ------------
>  1 files changed, 0 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index ccbbf63..61ccbd2 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -1864,17 +1864,6 @@ static struct rdev_sysfs_entry rdev_state =
>  __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_show, rdev_size_store);
>  
>  static struct attribute *rdev_default_attrs[] = {
>  	&rdev_state.attr,
> -	&rdev_super.attr,
>  	&rdev_errors.attr,
>  	&rdev_slot.attr,
>  	&rdev_offset.attr,
> --
> To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2008-03-25  3:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22 22:25 Wakko Warner
2008-03-23  0:36 ` Andrew Morton
2008-03-25  3:52   ` Neil Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18408.30478.519821.624319@notabene.brown \
    --to=neilb@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=wakko@animx.eu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®