Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions drivers/nvme/host/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,14 @@ static ssize_t nvme_ctrl_reconnect_delay_store(struct device *dev,
if (err)
return err;

/*
* reconnect_delay is used as a divisor by nvme_ctrl_loss_tmo_store()
* and the reconnect logic expects a positive value, just like the
* nvme-fabrics option parser does.
*/
if (!v || v > INT_MAX)
return -EINVAL;

ctrl->opts->reconnect_delay = v;
return count;
}
Expand Down
Loading