* [PATCH] cxgb3: Missing rtnl lock in error recovery
@ 2013-06-30 4:37 Benjamin Herrenschmidt
2013-07-02 19:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2013-06-30 4:37 UTC (permalink / raw)
To: netdev; +Cc: Divy Le Ray, Vipul Pandya, Jay Hernandez, Gavin Shan
When exercising error injection on IBM pseries machine, I hit the
following warning:
[ 251.450043] RTAS: event: 89, Type: Platform Error, Severity: 2
[ 253.549822] cxgb3 0006:01:00.0: enabling device (0140 -> 0142)
[ 253.713560] cxgb3 0006:01:00.0: adapter recovering, PEX ERR 0x100
[ 254.895437] RTNL: assertion failed at net/core/dev.c (2031)
[ 254.895467] CPU: 6 PID: 5449 Comm: eehd Tainted: G W 3.10.0-rc7-00157-gea461ab #19
[ 254.895474] Call Trace:
[ 254.895483] [c000000fac56f7d0] [c000000000014dcc] .show_stack+0x7c/0x1f0 (unreliable)
[ 254.895493] [c000000fac56f8a0] [c0000000007ba318] .dump_stack+0x28/0x3c
[ 254.895500] [c000000fac56f910] [c0000000006c0384] .netif_set_real_num_tx_queues+0x224/0x230
[ 254.895515] [c000000fac56f9b0] [d00000000ef35510] .cxgb_open+0x80/0x3f0 [cxgb3]
[ 254.895525] [c000000fac56fa50] [d00000000ef35914] .t3_resume_ports+0x94/0x100 [cxgb3]
[ 254.895533] [c000000fac56fae0] [c00000000005fc8c] .eeh_report_resume+0x8c/0xd0
[ 254.895539] [c000000fac56fb60] [c00000000005e9fc] .eeh_pe_dev_traverse+0x9c/0x190
[ 254.895545] [c000000fac56fc10] [c000000000060000] .eeh_handle_event+0x110/0x330
[ 254.895551] [c000000fac56fca0] [c000000000060350] .eeh_event_handler+0x130/0x1a0
[ 254.895558] [c000000fac56fd30] [c0000000000ad758] .kthread+0xe8/0xf0
[ 254.895566] [c000000fac56fe30] [c00000000000a05c] .ret_from_kernel_thread+0x5c/0x80
It appears that t3_resume_ports() is called with the rtnl_lock held from
the fatal error task but not from the PCI error callbacks. This fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@vger.kernel.org>
---
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index 71497e8..b650951 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -3037,7 +3037,9 @@ static void t3_io_resume(struct pci_dev *pdev)
CH_ALERT(adapter, "adapter recovering, PEX ERR 0x%x\n",
t3_read_reg(adapter, A_PCIE_PEX_ERR));
+ rtnl_lock();
t3_resume_ports(adapter);
+ rtnl_unlock();
}
static const struct pci_error_handlers t3_err_handler = {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb3: Missing rtnl lock in error recovery
2013-06-30 4:37 [PATCH] cxgb3: Missing rtnl lock in error recovery Benjamin Herrenschmidt
@ 2013-07-02 19:38 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-07-02 19:38 UTC (permalink / raw)
To: benh; +Cc: netdev, divy, vipul, jay, shangw
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Sun, 30 Jun 2013 14:37:11 +1000
> When exercising error injection on IBM pseries machine, I hit the
> following warning:
...
> It appears that t3_resume_ports() is called with the rtnl_lock held from
> the fatal error task but not from the PCI error callbacks. This fixes it.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Looks good, applied and queued up for -stable, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-02 19:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30 4:37 [PATCH] cxgb3: Missing rtnl lock in error recovery Benjamin Herrenschmidt
2013-07-02 19:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).