diff options
| author | Rio <rioo.tsukatsukii@gmail.com> | 2026-02-22 17:08:04 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-03-28 07:19:33 +0300 |
| commit | a9dff0d0d11ce9aeebdd52ecf1469895e336c87e (patch) | |
| tree | 8091e0581411ef3ef92404d54cdf1f48010f91ad /tools/testing | |
| parent | a75d207916de0909e2244bc66a44d72fadbcf383 (diff) | |
| download | linux-a9dff0d0d11ce9aeebdd52ecf1469895e336c87e.tar.xz | |
kernel/panic: allocate taint string buffer dynamically
The buffer used to hold the taint string is statically allocated, which
requires updating whenever a new taint flag is added.
Instead, allocate the exact required length at boot once the allocator is
available in an init function. The allocation sums the string lengths in
taint_flags[], along with space for separators and formatting.
print_tainted() is switched to use this dynamically allocated buffer.
If allocation fails, print_tainted() warns about the failure and continues
to use the original static buffer as a fallback.
Link: https://lkml.kernel.org/r/20260222140804.22225-1-rioo.tsukatsukii@gmail.com
Signed-off-by: Rio <rioo.tsukatsukii@gmail.com>
Cc: Joel Granados <joel.granados@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Wang Jinchao <wangjinchao600@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions
