mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Yaohan Li <shunsheng1218@gmail.com>,
	agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com,
	bmarzins@redhat.com
Cc: johannes.thumshirn@wdc.com, mkp@kernel.org, axboe@kernel.dk,
	dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dm: avoid double-dropping the zone reset submission reference
Date: Mon, 9 Nov 2026 15:10:51 +0900	[thread overview]
Message-ID: <961e5e97-0692-4642-a0cb-aafdcf7150d4@kernel.org> (raw)
In-Reply-To: <179378374219.68809.15920762511563622507@gmail.com>

On 11/4/26 18:15, Yaohan Li wrote:
> On an error in __send_zone_reset_all(), the submission reference
> held by the dm_io can be decremented there and again by the caller's
> error path. If another clone is still outstanding, the second drop
> can release the dm_io before that clone completes.
> 
> Only drop the submission reference in __send_zone_reset_all() on
> success. On failure, leave the reference for the caller's existing
> error handling to release once.
> 
> The error path was reproduced under KASAN with an injected GFP_NOIO
> allocation failure while another zone-reset clone remained in
> flight. With the change, the same failure was reported normally,
> without the observed use-after-free, and ordinary zone resets
> continued to work.
> 
> Fixes: 81e7706345f06 ("dm: handle REQ_OP_ZONE_RESET_ALL")
> Assisted-by: ZCode:GLM-4

Drop this please.

> Signed-off-by: Yaohan Li <shunsheng1218@gmail.com>

Looks OK to me.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>


-- 
Damien Le Moal
Western Digital Research

      reply	other threads:[~2026-11-09  6:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  9:15 Yaohan Li
2026-11-09  6:10 ` Damien Le Moal [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=961e5e97-0692-4642-a0cb-aafdcf7150d4@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=shunsheng1218@gmail.com \
    --cc=snitzer@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®