IOMMU Archive mirror
 help / color / mirror / Atom feed
From: "Petr Tesařík" <petr@tesarici.cz>
To: Christoph Hellwig <hch@lst.de>
Cc: Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Michael Kelley <mhkelley58@gmail.com>,
	Nikita Ioffe <ioffe@google.com>
Subject: Re: [PATCH] swiotlb: Initialise restricted pool list_head when SWIOTLB_DYNAMIC=y
Date: Sat, 4 May 2024 11:02:23 +0200	[thread overview]
Message-ID: <20240504110223.3a854f96@meshulam.tesarici.cz> (raw)
In-Reply-To: <20240502125601.GA20723@lst.de>

On Thu, 2 May 2024 14:56:01 +0200
Christoph Hellwig <hch@lst.de> wrote:

> Thanks,
> 
> applied to the dma-mapping for-linus branch.
> 
> I plan to send it to Linus this weekend unless someone find a grave bug
> in this pretty obvious one liner.

Thank you, and big thanks to Will for the fix!

Yes, the fix is obviously correct. During development, the pool list was
never dereferenced when mem->can_grow was false, but I forgot to add
the initialization when I optimized away the check for can_grow.

BTW this mem->can_grow flag is also why mem->dyn_alloc can be left
uninitialized, but now I wonder if it should be initialized even though
it's unused, just to make the code more robust in case of future
changes.

Petr T

      reply	other threads:[~2024-05-04  9:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02  9:37 [PATCH] swiotlb: Initialise restricted pool list_head when SWIOTLB_DYNAMIC=y Will Deacon
2024-05-02 12:56 ` Christoph Hellwig
2024-05-04  9:02   ` Petr Tesařík [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=20240504110223.3a854f96@meshulam.tesarici.cz \
    --to=petr@tesarici.cz \
    --cc=hch@lst.de \
    --cc=ioffe@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mhkelley58@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=will@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).