[PATCH 1/6] nvme: reject a reconnect_delay of 0 through sysfs

Nilay Shroff nilay at linux.ibm.com
Fri Nov 6 05:32:48 PST 2026


On 11/6/26 7:28 AM, Guixin Liu wrote:
> nvme_ctrl_reconnect_delay_store() accepts any value the option parser
> also accepts, except that it misses the lower bound: writing 0 is
> rejected by nvmf_parse_options() but not by the sysfs attribute.
> nvme_ctrl_loss_tmo_store() then divides by opts->reconnect_delay in
> DIV_ROUND_UP(), so writing 0 followed by any ctrl_loss_tmo update
> crashes the kernel with a division by zero.
> 
> Reject 0 like the option parser does.
> 
> Fixes: 42a45274c2258 ("nvme-fabrics: Allow ctrl loss timeout configuration")
> Cc:stable at vger.kernel.org
> Signed-off-by: Guixin Liu<kanie at linux.alibaba.com>

Looks good to me:
Reviewed-by: Nilay Shroff <nilay at linux.ibm.com>




More information about the Linux-nvme mailing list