All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Wendel Devantier <foss@defmacro.it>
To: Klaus Jensen <its@irrelevant.dk>
Cc: qemu-devel@nongnu.org, Keith Busch <kbusch@kernel.org>,
	qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>
Subject: Re: [PATCH 3/3] hw/nvme: fix broadcast fdp events handling
Date: Thu, 12 Nov 2026 17:39:34 +0100	[thread overview]
Message-ID: <20261112173512.0-foss@defmacro.it> (raw)
In-Reply-To: <20261112-nvme-for-rc-v1-3-69b3e5dcd5c8@samsung.com>



On Thu, 12 Nov 2026 10:53:30 +0100, Klaus Jensen <its@irrelevant.dk> wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
>
> The Set Features handler for the FDP Events feature asserts that a
> namespace is passed in the command because the feature is
> namespace-specific. An invalid namespace is rejected prior to reaching
> the handler, but the "broadcast nsid" (0xFFFFFFFF) is considered valid
> and causes the assert to abort QEMU.
>
> Reject it with Invalid Field in Command instead as per the
> specification.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4792
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> ---
>  hw/nvme/ctrl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
> index a0d22dacedfa..71c24dc02b67 100644
> --- a/hw/nvme/ctrl.c
> +++ b/hw/nvme/ctrl.c
> @@ -6636,7 +6636,9 @@ static uint16_t nvme_set_feature_fdp_events(NvmeCtrl *n, NvmeNamespace *ns,
>      g_autofree uint8_t *events = NULL;
>      NvmeRuHandle *ruh = NULL;
>  
> -    assert(ns);
> +    if (!ns) {
> +        return NVME_INVALID_FIELD | NVME_DNR;
> +    }
>  
>      if (!n->subsys || !n->subsys->endgrp.fdp.enabled) {
>          return NVME_FDP_DISABLED | NVME_DNR;
>
> -- 
> 2.53.0
>
>
>

Reviewed-by: Jesper Wendel Devantier <foss@defmacro.it>







      parent reply	other threads:[~2026-11-12 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  9:53 [PATCH 0/3] hw/nvme: misc fixes Klaus Jensen
2026-11-12  9:53 ` [PATCH 1/3] hw/nvme: reject fdp.runs smaller than the lba data size Klaus Jensen
2026-11-12 13:13   ` Tommaso Califano
2026-11-12 18:04     ` Klaus Jensen
2026-11-12 21:38   ` Jesper Wendel Devantier
2026-11-12  9:53 ` [PATCH 2/3] hw/nvme: fix fdp reclaim unit accounting Klaus Jensen
2026-11-12 13:15   ` Tommaso Califano
2026-11-12 16:08   ` Jesper Wendel Devantier
2026-11-12  9:53 ` [PATCH 3/3] hw/nvme: fix broadcast fdp events handling Klaus Jensen
2026-11-12 13:16   ` Tommaso Califano
2026-11-12 16:39   ` Jesper Wendel Devantier [this message]

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=20261112173512.0-foss@defmacro.it \
    --to=foss@defmacro.it \
    --cc=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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.