netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Massimo Cetra <ctrixk@navynet.it>
Cc: David Miller <davem@davemloft.net>,
	rjw@sisk.pl, linux-kernel@vger.kernel.org,
	kernel-testers@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [Bug #14378] Problems with net/core/skbuff.c
Date: Tue, 13 Oct 2009 12:19:51 +0200	[thread overview]
Message-ID: <4AD45447.7030705@gmail.com> (raw)
In-Reply-To: <4AD44435.3050703@navynet.it>

Massimo Cetra a écrit :
> David Miller ha scritto:
>> From: "Rafael J. Wysocki" <rjw@sisk.pl>
>> Date: Mon, 12 Oct 2009 00:22:04 +0200 (CEST)
>>
>>  
>>> Bug-Entry    : http://bugzilla.kernel.org/show_bug.cgi?id=14378
>>> Subject        : Problems with net/core/skbuff.c
>>> Submitter    : Massimo Cetra <mcetra@navynet.it>
>>> Date        : 2009-10-08 14:51 (4 days old)
>>> References    : http://marc.info/?l=linux-kernel&m=125501488220358&w=4
>>>     
>>
>> I don't know what to do about this one.
>>
>> The user indicates that they have the vserver patches applied,
>> so maybe there is some interaction with that stuff.
>>   
> Actually i found another oops which is very similar to the previous one.
> Here, vserver is not involved, and the problem starts at drbd which
> lives in kernel space (the other oops started at ocfs2).
> 
> Both ocfs2 and drbd make heavy use of network I/O so i guess the problem
> is something in the network layer.
> 
> Anything i can do to help to debugging and solving this issue ?
> 
> Thanks
> Max
> 

Problem is kfree_skb() is called from irq context, wich is not allowed.

static void skb_release_head_state(struct sk_buff *skb)
{
...
if (skb->destructor) {
	WARN_ON(in_irq());
	skb->destructor();
}
...
}

virtio_net start_xmit() function calls free_old_xmit_skbs() and 
free_old_xmit_skbs() ultimately calls kfree_skb()

Quick fix would be to use dev_kfree_skb_any() instead,
because netpoll can definitly calls start_xmit()
with irq disabled.

Could you please following patch ?

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 8d00976..54bf091 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -454,7 +454,7 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi)
 		vi->dev->stats.tx_bytes += skb->len;
 		vi->dev->stats.tx_packets++;
 		tot_sgs += skb_vnet_hdr(skb)->num_sg;
-		kfree_skb(skb);
+		dev_kfree_skb_any(skb);
 	}
 	return tot_sgs;
 }

  parent reply	other threads:[~2009-10-13 10:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-11 22:07 2.6.32-rc4: Reported regressions from 2.6.31 Rafael J. Wysocki
     [not found] ` <r-4Wjt4coy.A.TPD.dal0KB@chimera>
     [not found]   ` <b637ec0b0910121148g34f46481n1d5d4edb67b0ac55@mail.gmail.com>
2009-10-12 21:55     ` [Bug #14372] Wireless not working after suspend-resume Rafael J. Wysocki
     [not found] ` <r-4Wjt4coy.A.CwC.Wal0KB@chimera>
     [not found]   ` <20091012.034224.64980795.davem@davemloft.net>
2009-10-13  9:11     ` [Bug #14378] Problems with net/core/skbuff.c Massimo Cetra
2009-10-13  9:23       ` Massimo Cetra
2009-10-13 10:19       ` Eric Dumazet [this message]
2009-10-13 10:25         ` David Miller
2009-10-13 10:26         ` Massimo Cetra
2009-10-14 19:27           ` Massimo Cetra
     [not found]             ` <4AD62626.6010709-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org>
2009-10-15  0:36               ` [PATCH] virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs() Eric Dumazet
2009-10-15  6:30                 ` David Miller
     [not found]       ` <4AD44435.3050703-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org>
2009-10-13 10:22         ` [Bug #14378] Problems with net/core/skbuff.c David Miller
     [not found]           ` <20091013.032237.45775304.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-10-13 10:27             ` Massimo Cetra

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=4AD45447.7030705@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=ctrixk@navynet.it \
    --cc=davem@davemloft.net \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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;
as well as URLs for NNTP newsgroup(s).