]> git.baikalelectronics.ru Git - kernel.git/commit
md: make sure desc_nr less than MD_SB_DISKS
authorYufen Yu <yuyufen@huawei.com>
Tue, 10 Dec 2019 07:01:29 +0000 (15:01 +0800)
committerSong Liu <songliubraving@fb.com>
Wed, 11 Dec 2019 18:38:08 +0000 (10:38 -0800)
commitd744e7b134fc25102daa24459b46dc816c050466
tree1c03c1bb7e5d3fed74e2655e572ec6dd00809563
parent6733f171e443e1f6f09295aa426a0b8927b4ccb4
md: make sure desc_nr less than MD_SB_DISKS

For super_90_load, we need to make sure 'desc_nr' less
than MD_SB_DISKS, avoiding invalid memory access of 'sb->disks'.

Fixes: 1120492a06af ("md: avoid invalid memory access for array sb->dev_roles")
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/md.c