Files
linux-stable-mirror/drivers/md
Benjamin Marzinski 8a7ef20bf7 dm init: Handle minors larger than 255
[ Upstream commit 140ce37fd7 ]

dm_parse_device_entry() simply copies the minor number into dmi.dev, but
the dev_t format splits the minor number between the lowest 8 bytes and
highest 12 bytes. If the minor number is larger than 255, part of it
will end up getting treated as the major number

Fix this by checking that the minor number is valid and then encoding it
as a dev_t.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:06:47 +02:00
..
2024-09-04 13:17:36 +02:00