]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit3b7436cc9449d5ff7fa1c1fd5bc3edb6402ff5b8
tree1c03c1bb7e5d3fed74e2655e572ec6dd00809563
parent028288df635f5a9addd48ac4677b720192747944
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: 228fc7d76db6 ("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