From: Pratyush Yadav <pratyush@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Mike Rapoport <rppt@kernel.org>,
Alexander Graf <graf@amazon.com>, Baoquan He <bhe@redhat.com>,
Changyuan Lyu <changyuanl@google.com>,
Chris Li <chrisl@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Pratyush Yadav <pratyush@kernel.org>,
kexec@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/4] kho: add support for preserving vmalloc allocations
Date: Wed, 24 Sep 2025 17:28:07 +0200 [thread overview]
Message-ID: <mafs0ikh7dg54.fsf@kernel.org> (raw)
In-Reply-To: <20250922143407.93e171f8b7c09eb21159a33e@linux-foundation.org> (Andrew Morton's message of "Mon, 22 Sep 2025 14:34:07 -0700")
On Mon, Sep 22 2025, Andrew Morton wrote:
> On Mon, 22 Sep 2025 10:19:48 -0300 Jason Gunthorpe <jgg@nvidia.com> wrote:
>
>> > +static void kho_vmalloc_free_chunks(struct kho_vmalloc *kho_vmalloc)
>> > +{
>> > + struct kho_vmalloc_chunk *chunk = KHOSER_LOAD_PTR(kho_vmalloc->first);
>> > +
>> > + while (chunk) {
>> > + struct kho_vmalloc_chunk *tmp = chunk;
>> > +
>> > + kho_vmalloc_unpreserve_chunk(chunk);
>> > +
>> > + chunk = KHOSER_LOAD_PTR(chunk->hdr.next);
>> > + kfree(tmp);
>>
>> Shouldn't this be free_page()?
>
> Or vfree()?
It should be free_page(). The chunk isn't in the vmalloc-ed area, it is
the metadata to track it. It gets allocated in new_vmalloc_chunk() using
get_zeroed_page().
>
> Not sure why this code works - I'll suspend the series from linux-next
> for now.
It only gets called in the error path and that didn't get hit during
testing I suppose. Until v3 the chunk was being allocated using
kzalloc() so I guess this got missed in the move to get_zeroed_page().
I think Mike is out of office this week. Do you think this series is
stable enough to land in the upcoming merge window? If so, I can send a
v6 with the fix today.
--
Regards,
Pratyush Yadav
next prev parent reply other threads:[~2025-09-24 15:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-21 5:44 [PATCH v5 0/4] kho: add support for preserving vmalloc allocations Mike Rapoport
2025-09-21 5:44 ` [PATCH v5 1/4] kho: check if kho is finalized in __kho_preserve_order() Mike Rapoport
2025-09-21 5:44 ` [PATCH v5 2/4] kho: replace kho_preserve_phys() with kho_preserve_pages() Mike Rapoport
2025-09-22 13:14 ` Jason Gunthorpe
2025-09-22 13:50 ` Pratyush Yadav
2025-09-21 5:44 ` [PATCH v5 3/4] kho: add support for preserving vmalloc allocations Mike Rapoport
2025-09-22 13:19 ` Jason Gunthorpe
2025-09-22 21:34 ` Andrew Morton
2025-09-24 15:28 ` Pratyush Yadav [this message]
2025-09-24 21:00 ` Andrew Morton
2025-09-25 11:22 ` Pratyush Yadav
2025-09-22 13:50 ` Pratyush Yadav
2025-09-22 14:17 ` Pasha Tatashin
2025-09-22 21:23 ` Andrew Morton
2025-09-22 22:31 ` yanjun.zhu
2025-09-22 23:08 ` Andrew Morton
2025-09-23 5:04 ` Zhu Yanjun
2025-09-21 5:44 ` [PATCH v5 4/4] lib/test_kho: use kho_preserve_vmalloc instead of storing addresses in fdt Mike Rapoport
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=mafs0ikh7dg54.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=changyuanl@google.com \
--cc=chrisl@kernel.org \
--cc=graf@amazon.com \
--cc=jgg@nvidia.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=rppt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.