mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
MD: fix a null dereference
rdev->mddev could be null in start time. Reported-by: Ming Lei <[email protected]> Fix: 5a85071c2cbc(md: use a separate bio_set for synchronous IO.) Cc: NeilBrown <[email protected]> Signed-off-by: Shaohua Li <[email protected]>
This commit is contained in:
parent
5a85071c2c
commit
7f053a6a74
1 changed files with 1 additions and 1 deletions
|
|
@ -205,7 +205,7 @@ EXPORT_SYMBOL_GPL(bio_alloc_mddev);
|
|||
|
||||
static struct bio *md_bio_alloc_sync(struct mddev *mddev)
|
||||
{
|
||||
if (!mddev->sync_set)
|
||||
if (!mddev || !mddev->sync_set)
|
||||
return bio_alloc(GFP_NOIO, 1);
|
||||
|
||||
return bio_alloc_bioset(GFP_NOIO, 1, mddev->sync_set);
|
||||
|
|
|
|||
Loading…
Reference in a new issue