From: Christoph Hellwig <hch@lst.de>
To: Aaron Esau <aaron1esau@gmail.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Anuj Gupta <anuj20.g@samsung.com>,
Kanchan Joshi <joshi.k@samsung.com>,
Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] block: fix dio leak on integrity metadata mapping failure
Date: Mon, 25 May 2026 09:45:51 +0200 [thread overview]
Message-ID: <20260525074551.GA5432@lst.de> (raw)
In-Reply-To: <20260518074258.1600307-1-aaron1esau@gmail.com>
> + if (unlikely(ret)) {
> + bio->bi_status = BLK_STS_IOERR;
> + bio_endio(bio);
> + break;
> + }
AFAICS the same issue also exists for the other goto fail case,
so we should convert the code at that label to a bio_endio().
I think both this and the existing -EAGAIN case and even the
-EIOCBQUEUED case leak the reference on the original bio. Or am
I missing something?
It might makes sense to stop playing games with that bio refcount
and just have a status field in struct blkdev_dio.
prev parent reply other threads:[~2026-05-25 7:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 7:42 [PATCH] block: fix dio leak on integrity metadata mapping failure Aaron Esau
2026-05-25 7:45 ` Christoph Hellwig [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=20260525074551.GA5432@lst.de \
--to=hch@lst.de \
--cc=aaron1esau@gmail.com \
--cc=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.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