Thread (5 messages) flat view 5 messages, 3 authors, 2014-02-25
STALE4567d

[PATCH] r8169: initialize rtl8169_stats seqlock

From: Kyle McMartin <hidden>
Date: 2014-02-25 01:12:37
Also in: lkml

From: Kyle McMartin <redacted>

Boris reports he's seeing:
[    9.195943] INFO: trying to register non-static key.
[    9.196031] the code is fine but needs lockdep annotation.
[    9.196031] turning off the locking correctness validator.
[    9.196031] CPU: 1 PID: 933 Comm: modprobe Not tainted 3.14.0-rc4+ #1
with the r8169 driver.

These are occuring because the seqcount embedded in u64_stats_sync on
32-bit SMP is uninitialized which is making lockdep unhappy.

Signed-off-by: Kyle McMartin <redacted>

---

Patch is only compile tested by me, as these initializers will disappear
on 64-bit.
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7118,6 +7118,8 @@ rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 
 	mutex_init(&tp->wk.mutex);
+	u64_stats_init(&tp->rx_stats.syncp);
+	u64_stats_init(&tp->tx_stats.syncp);
 
 	/* Get MAC address */
 	for (i = 0; i < ETH_ALEN; i++)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help