public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: nic_swsd@realtek.com, netdev@vger.kernel.org
Subject: Re: r8169 OOPSen in rtl_rx
Date: Wed, 14 Aug 2013 11:29:15 +0200	[thread overview]
Message-ID: <20130814092915.GF24092@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20130813211534.GA5635@electric-eye.fr.zoreil.com>

[-- Attachment #1: Type: text/plain, Size: 2937 bytes --]

On Tue, Aug 13, 2013 at 11:15:34PM +0200, Francois Romieu wrote:
> Peter Zijlstra <peterz@infradead.org> :
> [...]
> > I've got an AMD x86_64 machine with two realtek NICs:
> > 
> > 01:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
> > 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
> 
> Which XID (see kernel dmesg) ?

$ dmesg | grep -i xid
[    1.706427] r8169 0000:01:08.0 eth0: RTL8110s at 0xffffc9000063ac00, 00:0e:2e:87:8b:70, XID 04000000 IRQ 18
[    1.717012] r8169 0000:03:00.0 eth1: RTL8168e/8111e at 0xffffc90000646000, a0:f3:c1:00:74:a3, XID 0c200000 IRQ 43

> > So all I've got to offer currently is a partial backtrace -- see
> > attached image.
> 
> (no attachment)

Oh, duh.. 

> > Partial transcribe:
> > 
> >   ? rtl8169_try_rx_copy.isra.77
> 
> /me scratches head.
> 
> You may check that pkt_size is > 0, <= ETH_FRAME_LEN (no jumbo ?) and
> see if it helps.

So eth0 runs at 1000Mb/s but has a MTU:1500, eth1 runs at 100Mb/s also
MTU:1500.

I'll try a kernel with the below. Hopefully the change in dumpstack_64.c
will avoid printing the 'process' stack and give a little more useful
information.

Will let you know.

Thanks

---
 arch/x86/kernel/dumpstack_64.c       | 7 ++++---
 drivers/net/ethernet/realtek/r8169.c | 2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index addb207..f76e98f 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -182,7 +182,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
 				stack = (unsigned long *) (irq_stack_end[-1]);
 				irq_stack_end = NULL;
 				ops->stack(data, "EOI");
-				continue;
+				goto out;
 			}
 		}
 		break;
@@ -192,6 +192,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
 	 * This handles the process stack:
 	 */
 	bp = ops->walk_stack(tinfo, stack, bp, ops, data, NULL, &graph);
+out:
 	put_cpu();
 }
 EXPORT_SYMBOL(dump_trace);
@@ -231,8 +232,8 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
 				pr_cont(" <EOI> ");
 			}
 		} else {
-		if (((long) stack & (THREAD_SIZE-1)) == 0)
-			break;
+			if (((long) stack & (THREAD_SIZE-1)) == 0)
+				break;
 		}
 		if (i && ((i % STACKSLOTS_PER_LINE) == 0))
 			pr_cont("\n");
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 393f961..76d1c18 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6185,6 +6185,8 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 			else
 				pkt_size = status & 0x00003fff;
 
+			WARN_ON(!(pkt_size > 0 && pkt_size <= ETH_FRAME_LEN));
+
 			/*
 			 * The driver does not support incoming fragmented
 			 * frames. They are seen as a symptom of over-mtu

[-- Attachment #2: IMG_20130810_195601.jpg --]
[-- Type: image/jpeg, Size: 301515 bytes --]

  reply	other threads:[~2013-08-14  9:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13  9:43 r8169 OOPSen in rtl_rx Peter Zijlstra
2013-08-13 21:15 ` Francois Romieu
2013-08-14  9:29   ` Peter Zijlstra [this message]
2013-08-14  9:52     ` Peter Zijlstra
2013-09-05 15:20       ` Peter Zijlstra
2013-09-05 23:09         ` Francois Romieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130814092915.GF24092@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox