netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bugreport: The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off
@ 2008-04-14 18:01 Arjan van de Ven
  2008-04-14 18:22 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2008-04-14 18:01 UTC (permalink / raw)
  To: NetDev

The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off,
which seems to be invalid (the comments of netif_receive_skb) certainly say so.

The calltrace is like this:

packet_rcv
netif_receive_skb
rtl8168_rx_interrupt
rtl8168_interrupt
handle_IRQ_event
handle_fasteoi_irq
do_IRQ


Which triggers a warning in packet_rcv() since that does a local_bh_enable(),
which gives a WARN_ON if irqs are disabled (rightfully so it seems).

The code looks is in rtl8169_rx_interrupt() line 2832 and looks like

                         if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0)
                                 rtl8169_rx_skb(skb);

with
#define rtl8169_rx_skb                  netif_receive_skb
higher up in the file.

This is the 46th highest ranking warnon/oops report for 2.6.25-rc

Greetings,
    Arjan van de Ven

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bugreport: The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off
  2008-04-14 18:01 bugreport: The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off Arjan van de Ven
@ 2008-04-14 18:22 ` Stephen Hemminger
  2008-04-14 18:24   ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2008-04-14 18:22 UTC (permalink / raw)
  To: Arjan van de Ven, Francois Romieu; +Cc: NetDev

On Mon, 14 Apr 2008 11:01:16 -0700
Arjan van de Ven <arjan@linux.intel.com> wrote:

> The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off,
> which seems to be invalid (the comments of netif_receive_skb) certainly say so.
> 
> The calltrace is like this:
> 
> packet_rcv
> netif_receive_skb
> rtl8168_rx_interrupt
> rtl8168_interrupt
> handle_IRQ_event
> handle_fasteoi_irq
> do_IRQ
> 
> 
> Which triggers a warning in packet_rcv() since that does a local_bh_enable(),
> which gives a WARN_ON if irqs are disabled (rightfully so it seems).
> 
> The code looks is in rtl8169_rx_interrupt() line 2832 and looks like
> 
>                          if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0)
>                                  rtl8169_rx_skb(skb);
> 
> with
> #define rtl8169_rx_skb                  netif_receive_skb
> higher up in the file.
> 
> This is the 46th highest ranking warnon/oops report for 2.6.25-rc
> 

rtl8169_rx_skb is defined as netif_receive_skb only if NAPI is enabled.
But the backtrace has CONFIG_R8169_NAPI disabled.

I also concerned that the reset_task calls rx_interrupt with different locking
than normal interrupt. 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bugreport: The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off
  2008-04-14 18:22 ` Stephen Hemminger
@ 2008-04-14 18:24   ` Arjan van de Ven
  2008-04-14 18:31     ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2008-04-14 18:24 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Francois Romieu, NetDev

Stephen Hemminger wrote:
> On Mon, 14 Apr 2008 11:01:16 -0700
> Arjan van de Ven <arjan@linux.intel.com> wrote:
> 
>> The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off,
>> which seems to be invalid (the comments of netif_receive_skb) certainly say so.
>>
>> The calltrace is like this:
>>
>> packet_rcv
>> netif_receive_skb
>> rtl8168_rx_interrupt
>> rtl8168_interrupt
>> handle_IRQ_event
>> handle_fasteoi_irq
>> do_IRQ
>>
>>
>> Which triggers a warning in packet_rcv() since that does a local_bh_enable(),
>> which gives a WARN_ON if irqs are disabled (rightfully so it seems).
>>
>> The code looks is in rtl8169_rx_interrupt() line 2832 and looks like
>>
>>                          if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0)
>>                                  rtl8169_rx_skb(skb);
>>
>> with
>> #define rtl8169_rx_skb                  netif_receive_skb
>> higher up in the file.
>>
>> This is the 46th highest ranking warnon/oops report for 2.6.25-rc
>>
> 
> rtl8169_rx_skb is defined as netif_receive_skb only if NAPI is enabled.
> But the backtrace has CONFIG_R8169_NAPI disabled.

what makes you think this config option is disabled ?
(just curious)

> I also concerned that the reset_task calls rx_interrupt with different locking
> than normal interrupt. 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bugreport: The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off
  2008-04-14 18:24   ` Arjan van de Ven
@ 2008-04-14 18:31     ` Stephen Hemminger
  2008-04-15 16:34       ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2008-04-14 18:31 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Francois Romieu, NetDev

On Mon, 14 Apr 2008 11:24:04 -0700
Arjan van de Ven <arjan@linux.intel.com> wrote:

> Stephen Hemminger wrote:
> > On Mon, 14 Apr 2008 11:01:16 -0700
> > Arjan van de Ven <arjan@linux.intel.com> wrote:
> > 
> >> The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off,
> >> which seems to be invalid (the comments of netif_receive_skb) certainly say so.
> >>
> >> The calltrace is like this:
> >>
> >> packet_rcv
> >> netif_receive_skb
> >> rtl8168_rx_interrupt
> >> rtl8168_interrupt
> >> handle_IRQ_event
> >> handle_fasteoi_irq
> >> do_IRQ
> >>
> >>
> >> Which triggers a warning in packet_rcv() since that does a local_bh_enable(),
> >> which gives a WARN_ON if irqs are disabled (rightfully so it seems).
> >>
> >> The code looks is in rtl8169_rx_interrupt() line 2832 and looks like
> >>
> >>                          if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0)
> >>                                  rtl8169_rx_skb(skb);
> >>
> >> with
> >> #define rtl8169_rx_skb                  netif_receive_skb
> >> higher up in the file.
> >>
> >> This is the 46th highest ranking warnon/oops report for 2.6.25-rc
> >>
> > 
> > rtl8169_rx_skb is defined as netif_receive_skb only if NAPI is enabled.
> > But the backtrace has CONFIG_R8169_NAPI disabled.
> 
> what makes you think this config option is disabled ?
> (just curious)

The receive path for NAPI would be:
	netif_receive_skb
	rtl8169_rx_interrupt
	rtl8169_napi
  
*** But we are both wrong ***
This is not the mainline r8169 driver but more likely the out of tree 
vendor 8168 driver. There is no rtl8168_rx_interrupt in mainline.



    

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bugreport: The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off
  2008-04-14 18:31     ` Stephen Hemminger
@ 2008-04-15 16:34       ` Arjan van de Ven
  0 siblings, 0 replies; 5+ messages in thread
From: Arjan van de Ven @ 2008-04-15 16:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Francois Romieu, NetDev

Stephen Hemminger wrote:
> *** But we are both wrong ***
> This is not the mainline r8169 driver but more likely the out of tree 
> vendor 8168 driver. There is no rtl8168_rx_interrupt in mainline.

woops...
sorry about that

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-15 16:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14 18:01 bugreport: The r8169.c driver is calling netif_receive_skb from hardirq and with interrupts off Arjan van de Ven
2008-04-14 18:22 ` Stephen Hemminger
2008-04-14 18:24   ` Arjan van de Ven
2008-04-14 18:31     ` Stephen Hemminger
2008-04-15 16:34       ` Arjan van de Ven

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).