Commit 8ab1d1fe authored by Benjamin Marzinski's avatar Benjamin Marzinski Committed by Greg Kroah-Hartman
Browse files

dm init: Handle minors larger than 255



[ Upstream commit 140ce37f ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2aa4bacb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment