md: raid1: check rdev before reference in raid1_sync_request func
authorZhiqiang Liu <liuzhiqiang26@huawei.com>
Tue, 10 Dec 2019 02:42:25 +0000 (10:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 10:24:10 +0000 (11:24 +0100)
commit7455901cd8dfebd8a515b5a5597fdf4db674d76e
tree8f52a40aadcce9390108852e86277dbbb78568b8
parentecbac9de94c0e165337eefa1e0adc573e01dff90
md: raid1: check rdev before reference in raid1_sync_request func

[ Upstream commit 028288df635f5a9addd48ac4677b720192747944 ]

In raid1_sync_request func, rdev should be checked before reference.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/raid1.c