Commit 70d1eb0
mm: vmalloc: only zero-init on vrealloc shrink
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: a0309fa ("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>1 parent f7a35a3 commit 70d1eb0
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4093 | 4093 | | |
4094 | 4094 | | |
4095 | 4095 | | |
4096 | | - | |
4097 | | - | |
| 4096 | + | |
| 4097 | + | |
4098 | 4098 | | |
4099 | 4099 | | |
4100 | 4100 | | |
| |||
4107 | 4107 | | |
4108 | 4108 | | |
4109 | 4109 | | |
4110 | | - | |
4111 | | - | |
4112 | | - | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
4113 | 4115 | | |
4114 | 4116 | | |
4115 | 4117 | | |
| |||
0 commit comments