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>
Thu, 9 Jan 2020 09:17:52 +0000 (10:17 +0100)
commit34ab847d906944ecd1976ad6f49870563bb0b322
treec429832af66abb3914fd94ac9314a962b51379aa
parentf42504ab0aec92b757468bb3cf4fa345d6ff822d
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