Linux block layer
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] block: Fix dio->ref leak on integrity error in __blkdev_direct_IO()
Date: Fri, 26 Jun 2026 08:24:44 -0600	[thread overview]
Message-ID: <aj6LrNre8nPaP_p7@kbusch-mbp> (raw)
In-Reply-To: <20260625092106.47695-1-vulab@iscas.ac.cn>

On Thu, Jun 25, 2026 at 05:21:06PM +0800, Wentao Liang wrote:
> @@ -239,8 +239,11 @@ static ssize_t __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
>  		}
>  		if (iocb->ki_flags & IOCB_HAS_METADATA) {
>  			ret = bio_integrity_map_iter(bio, iocb->private);
> -			if (unlikely(ret))
> -				goto fail;
> +			if (unlikely(ret)) {
> +				bio->bi_status = errno_to_blk_status(ret);
> +				bio_endio(bio);
> +				break;
> +			}

I've submitted this same fix earlier:

  https://lore.kernel.org/linux-block/20260624170905.3972095-3-kbusch@meta.com/

      parent reply	other threads:[~2026-06-26 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25  9:21 [PATCH] block: Fix dio->ref leak on integrity error in __blkdev_direct_IO() Wentao Liang
2026-06-26  8:58 ` Yang Xiuwei
2026-06-26 14:24 ` Keith Busch [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=aj6LrNre8nPaP_p7@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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