summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorEugen Hristev <eugen.hristev@linaro.org>2025-01-10 15:57:14 +0300
committerKees Cook <kees@kernel.org>2025-01-10 19:51:46 +0300
commit067cdf020329a07dd8ee1574c3086998343b1b2b (patch)
treec61123813e0ed0e90796ba2d09bf32ab03c60656 /tools/perf/scripts/python/export-to-postgresql.py
parent542243af7182efaeaf6d0f4643f7de437541a9af (diff)
downloadlinux-067cdf020329a07dd8ee1574c3086998343b1b2b.tar.xz
pstore/zone: avoid dereferencing zero sized ptr after init zones
In psz_init_zones, if the requested area has a total_size less than record_size, kcalloc will be called with c == 0 and will return ZERO_SIZE_PTR. Further, this will lead to an oops. With this patch, in this scenario, it will look like this : [ 6.865545] pstore_zone: total size : 28672 Bytes [ 6.865547] pstore_zone: kmsg size : 65536 Bytes [ 6.865549] pstore_zone: pmsg size : 0 Bytes [ 6.865551] pstore_zone: console size : 0 Bytes [ 6.865553] pstore_zone: ftrace size : 0 Bytes [ 6.872095] pstore_zone: zone dmesg total_size too small [ 6.878234] pstore_zone: alloc zones failed Signed-off-by: Eugen Hristev <eugen.hristev@linaro.org> Link: https://lore.kernel.org/r/20250110125714.2594719-1-eugen.hristev@linaro.org Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions