diff options
| author | Haoqin Huang <haoqinhuang@tencent.com> | 2026-08-04 17:38:38 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-08-24 18:43:04 -0700 |
| commit | 6dc404d433adf09045565054aecf85714db95b46 (patch) | |
| tree | 153dfda72ec583751bb5351f11de489d17492eef /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 45214458d6b50124afef3187f6352adeddf74d6f (diff) | |
zram: reject zero-size dictionary
kernel_read_file_from_path() already rejects empty files (i_size <= 0) and
returns -EINVAL, but the current implementation only checks for sz < 0
without logging any information. Use sz == 0 to reject the zero-size case
and print distinct error messages for each failure type.
Link: https://lore.kernel.org/20260804093841.67920-3-haoqinhuang7@gmail.com
Signed-off-by: Haoqin Huang <haoqinhuang@tencent.com>
Signed-off-by: Rongwei Wang <zigiwang@tencent.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: David Sterba <dsterba@suse.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nick Terrell <terrelln@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
