From: NeilBrown <neilb@suse.de>
To: Jonathan Brassow <jbrassow@redhat.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] MD: raid1 s/sysfs_notify_dirent/sysfs_notify_dirent_safe
Date: Wed, 20 Jul 2011 11:47:37 +1000 [thread overview]
Message-ID: <20110720114737.7dbdf2c4@notabene.brown> (raw)
In-Reply-To: <1310676829.2246.7.camel@f14.redhat.com>
On Thu, 14 Jul 2011 15:53:49 -0500 Jonathan Brassow <jbrassow@redhat.com>
wrote:
> If device-mapper creates a RAID1 array that includes devices to
> be rebuilt, it will deref a NULL pointer when finished because
> sysfs is not used by device-mapper instantiated RAID devices.
>
> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
>
> Index: linux-2.6/drivers/md/raid1.c
> ===================================================================
> --- linux-2.6.orig/drivers/md/raid1.c
> +++ linux-2.6/drivers/md/raid1.c
> @@ -1027,7 +1027,7 @@ static int raid1_spare_active(mddev_t *m
> && !test_bit(Faulty, &rdev->flags)
> && !test_and_set_bit(In_sync, &rdev->flags)) {
> count++;
> - sysfs_notify_dirent(rdev->sysfs_state);
> + sysfs_notify_dirent_safe(rdev->sysfs_state);
> }
> }
> spin_lock_irqsave(&conf->device_lock, flags);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Applied, thanks.
NeilBrown
prev parent reply other threads:[~2011-07-20 1:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 20:53 [PATCH] MD: raid1 s/sysfs_notify_dirent/sysfs_notify_dirent_safe Jonathan Brassow
2011-07-20 1:47 ` NeilBrown [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=20110720114737.7dbdf2c4@notabene.brown \
--to=neilb@suse.de \
--cc=jbrassow@redhat.com \
--cc=linux-raid@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).