md/raid10: add rcu protection to rdev access in raid10_sync_request.
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:14 +0000 (11:54 -0700)
commitf90145f317efad72e6552cecb09ab7a4e5d1e404
treeb943d30b3ebedce33174711f3efabad4eaad0215
parentd44b0a928fa9925fb453d7acc42a48c79de2c6f7
md/raid10: add rcu protection to rdev access in raid10_sync_request.

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

Previously they could not become NULL during a resync/recovery/reshape either.
However when remove_and_add_spares() was added to hot_remove_disk(), that
changed.

So raid10_sync_request didn't previously need to protect rdev access,
but now it does.

Fix missed check(Shaohua)
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid10.c
This page took 0.02459 seconds and 5 git commands to generate.