]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: fix address sanitizer warning in raid_resume
authorMikulas Patocka <mpatocka@redhat.com>
Sun, 24 Jul 2022 18:33:52 +0000 (14:33 -0400)
committerMike Snitzer <snitzer@kernel.org>
Thu, 28 Jul 2022 21:29:56 +0000 (17:29 -0400)
commitd59d1ab9b4c02b705755e27fef5b5468af29067c
tree12ddbf9201351f8d0d17acbe8661935c545c8587
parent5cc8911c3881d044a96b51d9722c506a5d7e1cfe
dm raid: fix address sanitizer warning in raid_resume

There is a KASAN warning in raid_resume when running the lvm test
lvconvert-raid.sh. The reason for the warning is that mddev->raid_disks
is greater than rs->raid_disks, so the loop touches one entry beyond
the allocated length.

Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-raid.c