]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:14 +0000 (11:18 +0200)
commit7c93f63ee8870ebb30f6a147fbdd72e88e3a2534
tree7453e7a7ad431d4abffe9c568af035b7aa544d1d
parent1cba8e60dd29cd3615b17f6a9738873c3ede91a9
dm raid: fix address sanitizer warning in raid_resume

commit d59d1ab9b4c02b705755e27fef5b5468af29067c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-raid.c