diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2025-10-30 12:44:17 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-11-20 14:03:40 -0800 |
| commit | d79a3aeb747c17095d679cc4402d87f0e7c3405e (patch) | |
| tree | e512aa428374aaaaa91b7c70b608cd22144ae2a6 /kernel/panic.c | |
| parent | 3e4b89e970365db7fe2c4171be06c0e88e3bcbe6 (diff) | |
panic: sys_info: capture si_bits_global before iterating over it
Patch series "panic: sys_info: Refactor and fix a potential issue", v3.
While targeting the compilation issue due to dangling variable, I have
noticed more opportunities for refactoring that helps to avoid above
mentioned compilation issue in a cleaner way and also fixes a potential
problem with global variable access.
This patch (of 6):
The for-loop might re-read the content of the memory the si_bits_global
points to on each iteration. Instead, just capture it for the sake of
consistency and use that instead.
Link: https://lkml.kernel.org/r/20251030132007.3742368-1-andriy.shevchenko@linux.intel.com
Link: https://lkml.kernel.org/r/20251030132007.3742368-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Feng Tang <feng.tang@linux.alibaba.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/panic.c')
0 files changed, 0 insertions, 0 deletions
