summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-04-30 00:52:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 08:29:32 -0700
commit6a51830e14529063cb2685921e1177d9af50e49a (patch)
treed10f96946d36928e8b4cd021be67072321eb4943 /drivers/md
parent7f1133cbf20bc308d73ba49f971180924e12119b (diff)
downloadop-kernel-dev-6a51830e14529063cb2685921e1177d9af50e49a.zip
op-kernel-dev-6a51830e14529063cb2685921e1177d9af50e49a.tar.gz
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')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index bb3e4b1..11457a2 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;
}
OpenPOWER on IntegriCloud