Skip to content

Commit 8e8aaf5

Browse files
maurizio-lombardiChristoph Hellwig
authored andcommitted
nvme-fabrics: ignore invalid fast_io_fail_tmo values
Valid fast_io_fail_tmo values are integers >= 0 or -1 (disabled). Prevent userspace from setting arbitrary negative values. Signed-off-by: Maurizio Lombardi <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 5a6254d commit 8e8aaf5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/nvme/host/fabrics.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
698698
if (token >= 0)
699699
pr_warn("I/O fail on reconnect controller after %d sec\n",
700700
token);
701+
else
702+
token = -1;
703+
701704
opts->fast_io_fail_tmo = token;
702705
break;
703706
case NVMF_OPT_HOSTNQN:

0 commit comments

Comments
 (0)