Files
lkl_linux/include/linux
Peter Zijlstra d5b0e0677b u64_stats,lockdep: Fix u64_stats_init() vs lockdep
Jakub reported that:

    static struct net_device *rtl8139_init_board(struct pci_dev *pdev)
    {
	    ...
	    u64_stats_init(&tp->rx_stats.syncp);
	    u64_stats_init(&tp->tx_stats.syncp);
	    ...
    }

results in lockdep getting confused between the RX and TX stats lock.
This is because u64_stats_init() is an inline calling seqcount_init(),
which is a macro using a static variable to generate a lockdep class.

By wrapping that in an inline, we negate the effect of the macro and
fold the static key variable, hence the confusion.

Fix by also making u64_stats_init() a macro for the case where it
matters, leaving the other case an inline for argument validation
etc.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Debugged-by: "Ahmed S. Darwish" <a.darwish@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: "Erhard F." <erhard_f@mailbox.org>
Link: https://lkml.kernel.org/r/YEXicy6+9MksdLZh@hirez.programming.kicks-ass.net
2021-03-10 09:51:45 +01:00
..
2021-02-02 00:16:57 +01:00
2021-01-23 14:57:21 +01:00
2021-02-26 15:49:51 -07:00
2021-01-24 14:27:17 +01:00
2021-02-26 09:41:03 -08:00
2021-02-17 14:07:48 +01:00
2020-12-19 11:18:38 -08:00
2021-01-21 14:06:00 -07:00
2021-01-06 16:24:59 -08:00
2021-01-16 15:12:06 -05:00
2021-01-18 14:26:51 +01:00
2021-02-08 12:28:07 +01:00
2021-02-11 13:24:44 -08:00
2021-03-04 06:36:22 -07:00
2021-01-27 12:27:36 +01:00
2020-12-15 16:19:31 +01:00
2021-02-26 09:41:03 -08:00
2021-01-18 16:13:51 +01:00
2020-12-15 16:19:31 +01:00
2021-02-17 14:12:42 +01:00
2021-01-21 16:16:10 +00:00
2021-02-26 09:41:02 -08:00
2021-02-26 09:41:03 -08:00
2021-01-22 15:09:42 +01:00
2021-01-14 11:20:17 +01:00
2021-02-26 09:41:03 -08:00
2021-02-08 12:28:07 +01:00
2021-01-04 11:42:21 -05:00
2021-02-16 16:11:14 -05:00
2021-02-02 10:26:12 +01:00
2021-02-17 13:17:49 -08:00
2021-02-26 09:40:59 -08:00
2021-01-21 14:06:00 -07:00
2021-02-03 19:05:50 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:20 +01:00
2021-02-26 09:41:03 -08:00
2021-01-16 23:19:26 +01:00
2021-01-28 00:35:03 +01:00
2021-03-02 17:25:46 -07:00
2021-02-20 10:13:32 -05:00
2021-01-06 16:24:59 -08:00
2021-02-09 12:27:29 -05:00
2021-02-13 17:17:53 +01:00
2021-01-21 16:16:10 +00:00
2021-02-01 13:20:07 -07:00
2021-01-18 10:52:41 +01:00
2021-02-09 12:15:07 +01:00
2021-01-21 14:06:00 -07:00
2021-01-24 14:27:17 +01:00
2021-02-08 22:58:55 +01:00