mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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: <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7f1133cbf2
commit
6a51830e14
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue