]> git.baikalelectronics.ru Git - kernel.git/commit
locking/local_lock: Add missing owner initialization
authorThomas Gleixner <tglx@linutronix.de>
Sun, 15 Aug 2021 21:27:37 +0000 (23:27 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 17 Aug 2021 14:38:40 +0000 (16:38 +0200)
commitf81c1f0ae3714fa0ae669014134a4cc00c5005b1
tree3da8fb6de5285f5adc308571ed3188e4f8b9d04d
parent2aa58e9980e414b172bf317b4aab94a77d90b44c
locking/local_lock: Add missing owner initialization

If CONFIG_DEBUG_LOCK_ALLOC=y is enabled then local_lock_t has an 'owner'
member which is checked for consistency, but nothing initialized it to
zero explicitly.

The static initializer does so implicit, and the run time allocated per CPU
storage is usually zero initialized as well, but relying on that is not
really good practice.

Fixes: 3de2ee293496 ("locking: Introduce local_lock()")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210815211301.969975279@linutronix.de
include/linux/local_lock_internal.h