]> 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)
commita936b96bcde0698a3d11fec05d242152e1ad3fc1
tree1c03c1bb7e5d3fed74e2655e572ec6dd00809563
parent4a99b5e1746c6693c334351c6801ed8281ec1d39
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: 9767572b8f4e ("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