Commit 7eec06fc authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: mm: vmalloc: actually use the in-place vrealloc region

commit f7a35a3c upstream.

Patch series "mm: vmalloc: Actually use the in-place vrealloc region".

This fixes a performance regression[1] with vrealloc()[1].

The refactoring to not build a new vmalloc region only actually worked
when shrinking.  Actually return the resized area when it grows.  Ugh.

Link: https://lkml.kernel.org/r/20250515214217.619685-1-kees@kernel.org


Fixes: a0309faf ("mm: vmalloc: support more granular vrealloc() sizing")
Signed-off-by: default avatarKees Cook <kees@kernel.org>
Reported-by: default avatarShung-Hsi Yu <shung-hsi.yu@suse.com>
Closes: https://lore.kernel.org/all/20250515-bpf-verifier-slowdown-vwo2meju4cgp2su5ckj@6gi6ssxbnfqg

 [1]
Tested-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Tested-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Tested-by: default avatarShung-Hsi Yu <shung-hsi.yu@suse.com>
Reviewed-by: default avatar"Uladzislau Rezki (Sony)" <urezki@gmail.com>
Reviewed-by: default avatarDanilo Krummrich <dakr@kernel.org>
Cc: "Erhard F." <erhard_f@mailbox.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 94efb0d6)
Bug: 437846539
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I1dc357fb32b20e29bcfede3a84895f3c142e0446
parent efba6a3d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment