]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: fix KASAN warning in raid5_add_disks
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 29 Jun 2022 17:40:57 +0000 (13:40 -0400)
committerMike Snitzer <snitzer@kernel.org>
Wed, 29 Jun 2022 23:48:04 +0000 (19:48 -0400)
commit6ff26b209a3b479f4eea765b517b1b15b057c1ce
tree6d09c8b83bf8c67a2979848541d0988be100dc69
parentd7c9e8f63e1452a4c2452d969cf823375518fa92
dm raid: fix KASAN warning in raid5_add_disks

There's a KASAN warning in raid5_add_disk when running the LVM testsuite.
The warning happens in the test
lvconvert-raid-reshape-linear_to_raid6-single-type.sh. We fix the warning
by verifying that rdev->saved_raid_disk is within limits.

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