nvmet-tcp: validate so_priority modparam value
authorChaitanya Kulkarni <kch@nvidia.com>
Mon, 27 Mar 2023 05:37:23 +0000 (22:37 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 13 Apr 2023 06:55:05 +0000 (08:55 +0200)
commit44aef3b850757a371adde7e47c5c243d3988aa73
treeee65a291831b0e53b9f778d20ee0ed6f582ca79e
parentaeacfcefa218f4ed11da478e9b7915a37d1afaff
nvmet-tcp: validate so_priority modparam value

The module parameter so_priority is passed to the function
sock_set_priority() which has following prototype and expect
priotity arg type to be u32:-

void sock_set_priority(struct sock *sk, u32 priority);

Add a module parameter validation callback to reject any negative
values for the so_priority as it is defigned as int. Use this
oppurtunity to update the module parameter description and print the
default value.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/tcp.c