]> git.baikalelectronics.ru Git - kernel.git/commit
dm init: fix max devices/targets checks
authorHelen Koike <helen.koike@collabora.com>
Fri, 26 Apr 2019 20:09:55 +0000 (17:09 -0300)
committerMike Snitzer <snitzer@redhat.com>
Tue, 30 Apr 2019 20:51:23 +0000 (16:51 -0400)
commit59403c505a21a4a14644972c2d9a627667e8ac7e
tree3722a8c549b69287410427e2820bc422aa762a11
parentd9a78590412066efaf0d91e73fe73fb4add1456a
dm init: fix max devices/targets checks

dm-init should allow up to DM_MAX_{DEVICES,TARGETS} for devices/targets,
and not DM_MAX_{DEVICES,TARGETS} - 1.

Fix the checks and also fix the error message when the number of devices
is surpassed.

Fixes: d947506a5e6084 ("dm: add support to directly boot to a mapped device")
Cc: stable@vger.kernel.org
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-init.c