summaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpiutil.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2025-09-10 16:04:38 +0800
committerJens Axboe <axboe@kernel.dk>2025-09-10 05:25:56 -0600
commitb46d4c447db76e36906ed59ebb9b3ef8f3383322 (patch)
treec8afeeba4bbed2ccb7b12025575b89d109ae4bd0 /lib/crypto/mpi/mpiutil.c
parent8bd7195fea6d9662aa3b32498a3828bfd9b63185 (diff)
blk-mq: check invalid nr_requests in queue_requests_store()
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@huawei.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions