Commit 1738e3ef authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Zheng Zengkai
Browse files

seqlock,lockdep: Fix seqcount_latch_init()



stable inclusion
from stable-5.10.24
commit 2a39eb7b86704ca2f9573adcb0029d6b9a84bf55
bugzilla: 51348

--------------------------------

[ Upstream commit 4817a52b ]

seqcount_init() must be a macro in order to preserve the static
variable that is used for the lockdep key. Don't then wrap it in an
inline function, which destroys that.

Luckily there aren't many users of this function, but fix it before it
becomes a problem.

Fixes: 80793c34 ("seqlock: Introduce seqcount_latch_t")
Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/YEeFEbNUVkZaXDp4@hirez.programming.kicks-ass.net


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent fdcc2d81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment