diff options
| author | Nathan Chancellor <[email protected]> | 2025-05-12 22:16:55 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2025-05-13 07:37:18 +0000 |
| commit | b5fcb6898202858ae8425bf0cd9cb5704735bd02 (patch) | |
| tree | 03b76585e0b509d78eaaad16b2f904c45587bab7 /rust/helpers/xarray.c | |
| parent | genirq: Fix inverted condition in handle_nested_irq() (diff) | |
| download | kernel-b5fcb6898202858ae8425bf0cd9cb5704735bd02.tar.gz kernel-b5fcb6898202858ae8425bf0cd9cb5704735bd02.zip | |
genirq: Ensure flags in lock guard is consistently initialized
After the conversion to locking guards within the interrupt core code,
several builds with clang show the "Interrupts were enabled early"
WARN() in start_kernel() on boot.
In class_irqdesc_lock_constructor(), _t.flags is initialized via
__irq_get_desc_lock() within the _t initializer list. However, the C11
standard 6.7.9.23 states that the evaluation of the initialization list
expressions are indeterminately sequenced relative to one another,
meaning _t.flags could be initialized by __irq_get_desc_lock() then be
initialized to zero due to flags being absent from the initializer list.
To ensure _t.flags is consistently initialized, move the call to
__irq_get_desc_lock() and the assignment of its result to _t.lock out of
the designated initializer.
Fixes: 0f70a49f3fa3 ("genirq: Provide conditional lock guards")
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Jiri Slaby <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Diffstat (limited to 'rust/helpers/xarray.c')
0 files changed, 0 insertions, 0 deletions
