diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-04-30 00:52:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 08:29:32 -0700 |
commit | 6a51830e14529063cb2685921e1177d9af50e49a (patch) | |
tree | d10f96946d36928e8b4cd021be67072321eb4943 /drivers/md/md.c | |
parent | 7f1133cbf20bc308d73ba49f971180924e12119b (diff) | |
download | linux-6a51830e14529063cb2685921e1177d9af50e49a.tar.bz2 |
md: fix use after free when removing rdev via sysfs
rdev->mddev is no longer valid upon return from entry->store() when the
'remove' command is given.
Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index bb3e4b1cb773..11457a28a14c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2097,7 +2097,7 @@ rdev_attr_store(struct kobject *kobj, struct attribute *attr, rv = -EBUSY; else rv = entry->store(rdev, page, length); - mddev_unlock(rdev->mddev); + mddev_unlock(mddev); } return rv; } |