md: raid10: Fix null pointer dereference in fix_read_error()
md: raid10: Fix null pointer dereference in fix_read_error()

Such NULL pointer dereference can occur when the driver was fixing the
read errors/bad blocks and the disk was physically removed
causing a system crash. This patch check if the
rcu_dereference() returns valid rdev before accessing it in fix_read_error().

Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org
Signed-off-by: Prasanna S. Panchamukhi <d49e6bb4a04ba88453cd5b1a8225ceae2dff5ae3@riverbed.com>
Signed-off-by: Rob Becker <2139c1c49bc5c27f001ed9cbc1af06f9eeded78c@riverbed.com>
Signed-off-by: NeilBrown <1c00aa603bb92d594c03cff60ecf8e63b2a5bcb1@suse.de>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas