public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <kch@nvidia.com>
Cc: hch@lst.de, leon@kernel.org, axboe@kernel.dk,
	linux-block@vger.kernel.org
Subject: Re: [PATCH] block: fix partial IOVA mapping cleanup in blk_rq_dma_map_iova
Date: Thu, 12 Feb 2026 11:17:11 +0100	[thread overview]
Message-ID: <20260212101711.GA8869@lst.de> (raw)
In-Reply-To: <20260211204944.23380-1-kch@nvidia.com>

On Wed, Feb 11, 2026 at 12:49:44PM -0800, Chaitanya Kulkarni wrote:
> When dma_iova_link() fails partway through mapping a request's bvec
> list, the function breaks out of the loop without cleaning up
> already mapped segments. Similarly, if dma_iova_sync() fails after
> linking all segments, no cleanup is performed.
> 
> This leaves partial IOVA mappings in place. The completion path
> attempts to unmap the full expected size via dma_iova_destroy() or
> nvme_unmap_data(), but only a partial size was actually mapped,
> leading to incorrect unmap operations.

Do you have a reproducer for this?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


  reply	other threads:[~2026-02-12 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 20:49 [PATCH] block: fix partial IOVA mapping cleanup in blk_rq_dma_map_iova Chaitanya Kulkarni
2026-02-12 10:17 ` Christoph Hellwig [this message]
2026-02-15  4:24   ` Chaitanya Kulkarni
2026-02-12 11:27 ` Jens Axboe

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=20260212101711.GA8869@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kch@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-block@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