From: Alice Ryhl <aliceryhl@google.com>
To: shivamkalra98@zohomail.in
Cc: Andrew Morton <akpm@linux-foundation.org>,
Uladzislau Rezki <urezki@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Danilo Krummrich <dakr@kernel.org>
Subject: Re: [PATCH v7 2/6] mm/vmalloc: fix vrealloc() grow-in-place check
Date: Tue, 24 Mar 2026 11:01:53 +0000 [thread overview]
Message-ID: <acJvIbXjeZdxBlH5@google.com> (raw)
In-Reply-To: <20260324-vmalloc-shrink-v7-2-c0e62b8e5d83@zohomail.in>
On Tue, Mar 24, 2026 at 03:30:27PM +0530, Shivam Kalra via B4 Relay wrote:
> From: Shivam Kalra <shivamkalra98@zohomail.in>
>
> Fix the grow-in-place check in vrealloc() to compare the requested size
> against the actual physical page count (vm->nr_pages) rather than the
> virtual area size (alloced_size, derived from get_vm_area_size()).
>
> The virtual reservation size (get_vm_area_size()) does not decrease when
> pages are freed during a shrink operation. Consequently, without this fix,
> a subsequent grow-in-place operation after a shrink would incorrectly
> succeed and attempt to access freed pages. Correcting this check is a
> prerequisite for the upcoming vrealloc() shrink functionality.
>
> Signed-off-by: Shivam Kalra <shivamkalra98@zohomail.in>
This commit is titled 'fix', but is it actually a fix for a bug that
exists today? Or is it just a refactor to support the follow-up
shrinking logic?
Alice
next prev parent reply other threads:[~2026-03-24 11:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 10:00 [PATCH v7 0/6] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-03-24 10:00 ` Shivam Kalra via B4 Relay
2026-03-24 10:00 ` [PATCH v7 1/6] mm/vmalloc: extract vm_area_free_pages() helper from vfree() Shivam Kalra
2026-03-24 10:00 ` Shivam Kalra via B4 Relay
2026-03-24 10:00 ` [PATCH v7 2/6] mm/vmalloc: fix vrealloc() grow-in-place check Shivam Kalra
2026-03-24 10:00 ` Shivam Kalra via B4 Relay
2026-03-24 11:01 ` Alice Ryhl [this message]
2026-03-24 11:17 ` Shivam Kalra
2026-03-24 10:00 ` [PATCH v7 3/6] mm/vmalloc: zero newly exposed memory on vrealloc() grow Shivam Kalra
2026-03-24 10:00 ` Shivam Kalra via B4 Relay
2026-03-24 10:00 ` [PATCH v7 4/6] mm/vmalloc: use READ_ONCE() for vmalloc nr_pages status readers Shivam Kalra
2026-03-24 10:00 ` Shivam Kalra via B4 Relay
2026-03-24 10:00 ` [PATCH v7 5/6] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
2026-03-24 10:00 ` Shivam Kalra via B4 Relay
2026-03-24 10:00 ` [PATCH v7 6/6] lib/test_vmalloc: add vrealloc test case Shivam Kalra
2026-03-24 10:00 ` Shivam Kalra via B4 Relay
2026-03-25 14:45 ` [PATCH v7 0/6] mm/vmalloc: free unused pages on vrealloc() shrink Shivam Kalra
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=acJvIbXjeZdxBlH5@google.com \
--to=aliceryhl@google.com \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shivamkalra98@zohomail.in \
--cc=urezki@gmail.com \
/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.