Commit 140ce37f authored by Benjamin Marzinski's avatar Benjamin Marzinski Committed by Mikulas Patocka
Browse files

dm init: Handle minors larger than 255



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: default avatarBenjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
parent c1a66a37
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment