diff options
author | 2025-02-04 05:47:41 +0000 | |
---|---|---|
committer | 2025-03-28 21:10:53 +0000 | |
commit | a30d4ff8193ef768dbb524824c7aa07c5486a63a (patch) | |
tree | a863cdc9c7497579a6645e89ec7d966136581f28 /include/linux | |
parent | Linux 6.14-rc6 (diff) | |
download | wireguard-linux-a30d4ff8193ef768dbb524824c7aa07c5486a63a.tar.xz wireguard-linux-a30d4ff8193ef768dbb524824c7aa07c5486a63a.zip |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kdb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 905a2e2f45f6..ecbf819deeca 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h @@ -104,7 +104,7 @@ extern int kdb_initial_cpu; #define KDB_NOENVVALUE (-6) #define KDB_NOTIMP (-7) #define KDB_ENVFULL (-8) -#define KDB_ENVBUFFULL (-9) +#define KDB_KMALLOCFAILED (-9) #define KDB_TOOMANYBPT (-10) #define KDB_TOOMANYDBREGS (-11) #define KDB_DUPBPT (-12) |