From: NeilBrown Date: Mon, 15 Dec 2014 01:56:59 +0000 (+1100) Subject: md/raid5: use ->lock to protect accessing raid5 sysfs attributes. X-Git-Tag: fixes-v4.0-rc1~120^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1485bab9c49b0d3811d72beb0de60c7b8b337d;p=pandora-kernel.git 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: NeilBrown --- Reading git-diff-tree failed