All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guixin Liu" <kanie@linux.alibaba.com>
Cc: linux-nvme@lists.infradead.org
Subject: Re: [PATCH 1/6] nvme: reject a reconnect_delay of 0 through sysfs
Date: Fri, 06 Nov 2026 02:09:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-200577@kernel.org> (raw)
In-Reply-To: <20261106015842.3534898-2-kanie@linux.alibaba.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] nvme: incorrect Fixes tag for nvme_ctrl_reconnect_delay_store() fix
--

commit b125e1489e83edb63c16621248dd345277c89cc1
Author: Guixin Liu <kanie@linux.alibaba.com>

nvme: reject a reconnect_delay of 0 through sysfs

This commit updates nvme_ctrl_reconnect_delay_store() in
drivers/nvme/host/sysfs.c to reject a reconnect_delay value of 0,
preventing a division by zero in nvme_ctrl_loss_tmo_store().

>     nvme: reject a reconnect_delay of 0 through sysfs
>     
>     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@vger.kernel.org
>     Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>

[Severity: Low]
Commit 42a45274c2258 ("nvme-fabrics: Allow ctrl loss timeout configuration")
only added ctrl_loss_tmo option parsing in nvmf_parse_options() in
drivers/nvme/host/fabrics.c, where a reconnect_delay <= 0 was already
rejected.

The sysfs store handlers nvme_ctrl_reconnect_delay_store() and
nvme_ctrl_loss_tmo_store() (later moved to drivers/nvme/host/sysfs.c in
commit 942e21c042e6) were introduced in commit 764075fdcb2f ("nvme: expose
reconnect_delay and ctrl_loss_tmo via sysfs").

Should the Fixes tag reference that commit instead:

  Fixes: 764075fdcb2f ("nvme: expose reconnect_delay and ctrl_loss_tmo via sysfs")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106015842.3534898-1-kanie@linux.alibaba.com?part=1


  reply	other threads:[~2026-11-06  2:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  1:58 [PATCH 0/6] nvme: fabrics and target fixes Guixin Liu
2026-11-06  1:58 ` [PATCH 1/6] nvme: reject a reconnect_delay of 0 through sysfs Guixin Liu
2026-11-06  2:09   ` sashiko-bot [this message]
2026-11-06  7:39   ` Hannes Reinecke
2026-11-06 10:33   ` Christoph Hellwig
2026-11-06 13:32   ` Nilay Shroff
2026-11-06  1:58 ` [PATCH 2/6] nvme-fc: fix iterator over rport->ctrl_list in nvme_fc_match_disconn_ls() Guixin Liu
2026-11-06  2:06   ` sashiko-bot
2026-11-06  7:38   ` Hannes Reinecke
2026-11-06 10:49     ` Guixin Liu
2026-11-06  1:58 ` [PATCH 3/6] nvme-auth: fix data race on ctrl->transaction Guixin Liu
2026-11-06  7:27   ` Hannes Reinecke
2026-11-06  9:28     ` Guixin Liu
2026-11-06  1:58 ` [PATCH 4/6] nvmet: take subsys->lock in nvmet_subsys_attr_tbkas_store() Guixin Liu
2026-11-06  7:27   ` Hannes Reinecke
2026-11-06 10:34   ` Christoph Hellwig
2026-11-06 13:32   ` Nilay Shroff
2026-11-06  1:58 ` [PATCH 5/6] nvmet: fix controller reference leak in nvmet_install_queue() error paths Guixin Liu
2026-11-06  7:31   ` Hannes Reinecke
2026-11-06  9:29     ` Guixin Liu
2026-11-06  1:58 ` [PATCH 6/6] nvmet: use GFP_KERNEL for PR allocations Guixin Liu
2026-11-06  7:31   ` Hannes Reinecke
2026-11-06 10:35   ` Christoph Hellwig
2026-11-06 13:35   ` Nilay Shroff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-200577@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kanie@linux.alibaba.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.