locking/local_lock: Add missing owner initialization
authorThomas Gleixner <tglx@linutronix.de>
Sun, 15 Aug 2021 21:27:37 +0000 (23:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:41 +0000 (09:50 +0200)
commit2600861b9069d57bff1cac0e73fd3aac4f181df1
treec3b9d84900f3efe04b78b9352fa4cc821aa1809f
parentd5462a630f7de9fc9cc25106b2adcb8cc69e51c2
locking/local_lock: Add missing owner initialization

[ Upstream commit d8bbd97ad0b99a9394f2cd8410b884c48e218cf0 ]

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: 91710728d172 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/local_lock_internal.h