From: Mike Rapoport <rppt@kernel.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-block@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
linux-efi@vger.kernel.org, virtualization@lists.linux.dev,
Justin Sanders <justin@coraid.com>, Jens Axboe <axboe@kernel.dk>,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH v3 0/7] Cleanup free_pages() misuse
Date: Thu, 4 Sep 2025 14:55:21 +0300 [thread overview]
Message-ID: <aLl-Kd4nmgSEr8WV@kernel.org> (raw)
In-Reply-To: <20250903185921.1785167-1-vishal.moola@gmail.com>
On Wed, Sep 03, 2025 at 11:59:14AM -0700, Vishal Moola (Oracle) wrote:
> free_pages() is supposed to be called when we only have a virtual address.
> __free_pages() is supposed to be called when we have a page.
>
> There are a number of callers that use page_address() to get a page's
> virtual address then call free_pages() on it when they should just call
> __free_pages() directly.
>
> Add kernel-docs for free_pages() to help callers better understand which
> function they should be calling, and replace the obvious cases of
> misuse.
>
> Vishal Moola (Oracle) (7):
> mm/page_alloc: Add kernel-docs for free_pages()
> aoe: Stop calling page_address() in free_page()
> x86: Stop calling page_address() in free_pages()
> riscv: Stop calling page_address() in free_pages()
> powerpc: Stop calling page_address() in free_pages()
> arm64: Stop calling page_address() in free_pages()
> virtio_balloon: Stop calling page_address() in free_pages()
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> arch/arm64/mm/mmu.c | 2 +-
> arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +-
> arch/riscv/mm/init.c | 4 ++--
> arch/x86/mm/init_64.c | 2 +-
> arch/x86/platform/efi/memmap.c | 2 +-
> drivers/block/aoe/aoecmd.c | 2 +-
> drivers/virtio/virtio_balloon.c | 8 +++-----
> mm/page_alloc.c | 9 +++++++++
> 8 files changed, 19 insertions(+), 12 deletions(-)
>
> --
> 2.51.0
>
>
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2025-09-04 11:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 18:59 [PATCH v3 0/7] Cleanup free_pages() misuse Vishal Moola (Oracle)
2025-09-03 18:59 ` [PATCH v3 1/7] mm/page_alloc: Add kernel-docs for free_pages() Vishal Moola (Oracle)
2025-09-03 18:59 ` [PATCH v3 2/7] aoe: Stop calling page_address() in free_page() Vishal Moola (Oracle)
2025-09-03 18:59 ` [PATCH v3 3/7] x86: Stop calling page_address() in free_pages() Vishal Moola (Oracle)
2025-09-04 11:51 ` Mike Rapoport
2025-09-04 11:54 ` Mike Rapoport
2025-09-05 18:02 ` Vishal Moola (Oracle)
2025-09-03 18:59 ` [PATCH v3 4/7] riscv: " Vishal Moola (Oracle)
2025-09-04 12:27 ` Alexandre Ghiti
2025-09-03 18:59 ` [PATCH v3 5/7] powerpc: " Vishal Moola (Oracle)
2025-09-04 7:10 ` Christophe Leroy
2025-09-03 18:59 ` [PATCH v3 6/7] arm64: " Vishal Moola (Oracle)
2025-09-03 18:59 ` [PATCH v3 7/7] virtio_balloon: " Vishal Moola (Oracle)
2025-09-03 19:13 ` David Hildenbrand
2025-09-04 21:38 ` Michael S. Tsirkin
2025-09-04 11:55 ` Mike Rapoport [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=aLl-Kd4nmgSEr8WV@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aou@eecs.berkeley.edu \
--cc=axboe@kernel.dk \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=justin@coraid.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=mst@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=virtualization@lists.linux.dev \
--cc=vishal.moola@gmail.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 NNTP newsgroup(s).