Files
linux/mm
Kees Cook a89d47c63e mm: vmalloc: only zero-init on vrealloc shrink
commit 70d1eb031a upstream.

The common case is to grow reallocations, and since init_on_alloc will
have already zeroed the whole allocation, we only need to zero when
shrinking the allocation.

Link: https://lkml.kernel.org/r/20250515214217.619685-2-kees@kernel.org
Fixes: a0309faf1c ("mm: vmalloc: support more granular vrealloc() sizing")
Signed-off-by: Kees Cook <kees@kernel.org>
Tested-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: "Erhard F." <erhard_f@mailbox.org>
Cc: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-29 11:14:06 +02:00
..
2024-11-07 14:38:07 -08:00
2024-11-03 01:28:06 -05:00
2025-05-18 08:26:01 +02:00
2025-01-25 20:22:38 -08:00
2024-11-11 00:26:44 -08:00
2025-01-13 22:40:51 -08:00
2024-08-15 22:16:14 -07:00
2024-07-10 12:14:54 -07:00
2025-01-27 19:25:45 -05:00
2023-04-12 17:36:23 -07:00
2024-04-25 20:55:48 -07:00
2024-04-25 20:55:48 -07:00