]> git.karo-electronics.de Git - linux-beck.git/commit
md/raid10: add rcu protection to rdev access during reshape.
authorNeilBrown <neilb@suse.com>
Thu, 2 Jun 2016 06:19:52 +0000 (16:19 +1000)
committerShaohua Li <shli@fb.com>
Mon, 13 Jun 2016 18:54:15 +0000 (11:54 -0700)
commitd094d6860b6678057f70dee27121ea4860c55e06
treef15d56552c46374fea09de2818e49aec0437626f
parentf90145f317efad72e6552cecb09ab7a4e5d1e404
md/raid10: add rcu protection to rdev access during reshape.

mirrors[].rdev can become NULL at any point unless:
   - a counted reference is held
   - ->reconfig_mutex is held, or
   - rcu_read_lock() is held

Reshape isn't always suitably careful as in the past rdev couldn't be
removed during reshape.  It can now, so add protection.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid10.c