Skip to content
Commit 7b1485ba authored by NeilBrown's avatar NeilBrown
Browse files

md/raid5: use ->lock to protect accessing raid5 sysfs attributes.



It is important that mddev->private isn't freed while
a sysfs attribute function is accessing it.

So use mddev->lock to protect the setting of ->private to NULL, and
take that lock when checking ->private for NULL and de-referencing it
in the sysfs access functions.

This only applies to the read ('show') side of access.  Write
access will be handled separately.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent f97fcad3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment