Re: [PATCH] block: add check of 'minors' and 'first_minor' in device_add_disk()

From: Jens Axboe
Date: Tue Dec 19 2023 - 10:24:00 EST



On Tue, 19 Dec 2023 15:59:42 +0800, linan666@xxxxxxxxxxxxxxx wrote:
> 'first_minor' represents the starting minor number of disks, and
> 'minors' represents the number of partitions in the device. Neither
> of them can be greater than MINORMASK + 1.
>
> Commit e338924bd05d ("block: check minor range in device_add_disk()")
> only added the check of 'first_minor + minors'. However, their sum might
> be less than MINORMASK but their values are wrong. Complete the checks now.
>
> [...]

Applied, thanks!

[1/1] block: add check of 'minors' and 'first_minor' in device_add_disk()
commit: 4c434392c4777881d01beada6701eff8c76b43fe

Best regards,
--
Jens Axboe