]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kdb: remove usage of static environment buffer
authorNir Lichtman <nir@lichtman.org>
Tue, 4 Feb 2025 05:47:41 +0000 (05:47 +0000)
committerDaniel Thompson <daniel@riscstar.com>
Fri, 28 Mar 2025 21:10:53 +0000 (21:10 +0000)
commita30d4ff8193ef768dbb524824c7aa07c5486a63a
treea863cdc9c7497579a6645e89ec7d966136581f28
parent80e54e84911a923c40d7bee33a34c1b4be148d7a
kdb: remove usage of static environment buffer

Problem: The set environment variable logic uses a static "heap" like
buffer to store the values of the variables, and they are never freed,
on top of that this is redundant since the kernel supplies allocation
facilities which are even used also in this file.

Solution: Remove the weird static buffer logic and use kmalloc instead,
call kfree when overriding an existing variable.

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250204054741.GB1219827@lichtman.org
Signed-off-by: Daniel Thompson <daniel@riscstar.com>
include/linux/kdb.h
kernel/debug/kdb/kdb_main.c