Files
linux-stable-mirror/include/linux
Petr TesarikandGreg Kroah-Hartman 80fa4fb273 u64_stats: fix u64_stats_init() for lockdep when used repeatedly in one file
[ Upstream commit 38a15d0a50 ]

Fix bogus lockdep warnings if multiple u64_stats_sync variables are
initialized in the same file.

With CONFIG_LOCKDEP, seqcount_init() is a macro which declares:

	static struct lock_class_key __key;

Since u64_stats_init() is a function (albeit an inline one), all calls
within the same file end up using the same instance, effectively treating
them all as a single lock-class.

Fixes: 9464ca6500 ("net: make u64_stats_init() a function")
Closes: https://lore.kernel.org/netdev/ea1567d9-ce66-45e6-8168-ac40a47d1821@roeck-us.net/
Signed-off-by: Petr Tesarik <petr@tesarici.cz>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240404075740.30682-1-petr@tesarici.cz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-17 11:19:28 +02:00
..
2024-01-25 15:35:39 -08:00
2023-11-28 17:19:55 +00:00
2024-03-26 18:19:40 -04:00
2024-04-03 15:28:18 +02:00
2024-03-26 18:20:13 -04:00
2024-04-03 15:28:29 +02:00
2023-11-20 11:58:53 +01:00
2024-02-05 20:14:27 +00:00
2023-11-28 17:19:54 +00:00
2023-09-29 17:20:46 -07:00
2023-11-28 17:19:48 +00:00
2023-10-06 11:01:23 +02:00
2023-10-06 11:01:23 +02:00
2024-01-31 16:19:01 -08:00
2023-11-28 17:19:38 +00:00
2024-01-31 16:18:47 -08:00