This is a note to let you know that I've just added the patch titled seqlock,lockdep: Fix seqcount_latch_init() to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: seqlock-lockdep-fix-seqcount_latch_init.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 9b34e83dc772bf459ac22ba62e4d80b5d8b9db78 Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Date: Tue Mar 9 15:21:18 2021 +0100 seqlock,lockdep: Fix seqcount_latch_init() [ Upstream commit 4817a52b306136c8b2b2271d8770401441e4cf79 ] 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: 80793c3471d9 ("seqlock: Introduce seqcount_latch_t") Reported-by: Eric Dumazet <eric.dumazet@xxxxxxxxx> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Link: https://lkml.kernel.org/r/YEeFEbNUVkZaXDp4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index cbfc78b92b65..1ac20d75b061 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -659,10 +659,7 @@ typedef struct { * seqcount_latch_init() - runtime initializer for seqcount_latch_t * @s: Pointer to the seqcount_latch_t instance */ -static inline void seqcount_latch_init(seqcount_latch_t *s) -{ - seqcount_init(&s->seqcount); -} +#define seqcount_latch_init(s) seqcount_init(&(s)->seqcount) /** * raw_read_seqcount_latch() - pick even/odd latch data copy