diff options
author | Tetsuo Handa <[email protected]> | 2021-12-17 23:51:25 +0900 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2021-12-21 09:34:29 -0700 |
commit | e338924bd05d6e71574bc13e310c89e10e49a8a5 (patch) | |
tree | 47ef4b851875b480e5de9324d79c78427d4e5274 /include/linux/overflow.h | |
parent | 37ae5a0f5287a52cf51242e76ccf198d02ffe495 (diff) |
block: check minor range in device_add_disk()
ioctl(fd, LOOP_CTL_ADD, 1048576) causes
sysfs: cannot create duplicate filename '/dev/block/7:0'
message because such request is treated as if ioctl(fd, LOOP_CTL_ADD, 0)
due to MINORMASK == 1048575. Verify that all minor numbers for that device
fit in the minor range.
Reported-by: wangyangbo <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions