Re: [PATCH] md: properly lock and unlock in rdev_attr_store()

2019-05-05 Thread Lukas Bulwahn
On Mon, 29 Apr 2019, NeilBrown wrote: > On Sun, Apr 28 2019, Lukas Bulwahn wrote: > > > rdev_attr_store() should lock and unlock mddev->reconfig_mutex in a > > balanced way with mddev_lock() and mddev_unlock(). > > It does. > > > > > But when rdev->mddev is NULL, rdev_attr_store() would try

Re: [PATCH] md: properly lock and unlock in rdev_attr_store()

2019-04-28 Thread NeilBrown
On Sun, Apr 28 2019, Lukas Bulwahn wrote: > rdev_attr_store() should lock and unlock mddev->reconfig_mutex in a > balanced way with mddev_lock() and mddev_unlock(). It does. > > But when rdev->mddev is NULL, rdev_attr_store() would try to unlock > without locking before. Resolve this locking

Re: [PATCH] md: properly lock and unlock in rdev_attr_store()

2019-04-28 Thread Song Liu
On Sun, Apr 28, 2019 at 3:41 AM Lukas Bulwahn wrote: > > rdev_attr_store() should lock and unlock mddev->reconfig_mutex in a > balanced way with mddev_lock() and mddev_unlock(). > > But when rdev->mddev is NULL, rdev_attr_store() would try to unlock > without locking before. Resolve this locking

[PATCH] md: properly lock and unlock in rdev_attr_store()

2019-04-28 Thread Lukas Bulwahn
rdev_attr_store() should lock and unlock mddev->reconfig_mutex in a balanced way with mddev_lock() and mddev_unlock(). But when rdev->mddev is NULL, rdev_attr_store() would try to unlock without locking before. Resolve this locking issue.. This locking issue was detected with Clang Thread Safety