Re: [PATCH for-6.18/block 03/10] blk-mq: check invalid nr_requests in queue_requests_store()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 9/8/25 11:45 AM, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@xxxxxxxxxx>
> 
> queue_requests_store() is the only caller of
> blk_mq_update_nr_requests(), and blk_mq_update_nr_requests() is the
> only caller of blk_mq_tag_update_depth(), however, they all have
> checkings for nr_requests input by user.
> 
> Make code cleaner by moving all the checkings to the top function:
> 
> 1) nr_requests > reserved tags;
> 2) if there is elevator, 4 <= nr_requests <= 2048;
> 3) if elevator is none, 4 <= nr_requests <= tag_set->queue_depth;
> 
> Meanwhile, case 2 is the only case tags can grow and -ENOMEM might be
> returned.
> 
> Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>

Looks good to me:
Reviewed-by: Nilay Shroff <nilay@xxxxxxxxxxxxx>





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux