linux-kernel.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:21 UTC|newest]

Thread overview: 82+ 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
2009-10-11 22:15 ` [Bug #14277] Caught 8-bit read from freed memory in b43 driver at association Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14278] New message "NOHZ: local_softirq_pending 08" at each ping request Rafael J. Wysocki
2009-10-12 13:15   ` Michael Buesch
2009-10-12 21:49     ` Rafael J. Wysocki
2009-10-13 14:27       ` John W. Linville
2009-10-13 20:50         ` Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14296] spitz boots but suspend/resume is broken Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14279] Suspend to RAM freeze totally since 2.6.32-rc1 - Acer Aspire 1511Lmi laptop Rafael J. Wysocki
2009-10-12  8:09   ` Jan Beulich
2009-10-12 21:50     ` Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14298] warning at manage.c:361 (set_irq_wake), matrix-keypad related? Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14302] Kernel panic on i386 machine when booting with profile=2 Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14334] pcmcia suspend regression from 2.6.31.1 to 2.6.31.2 - Dell Inspiron 600m Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14299] oops in wireless, iwl3945 related? Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14297] console resume broken since ba15ab0e8d Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14352] WARNING: at net/mac80211/scan.c:267 Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14354] Bad corruption with 2.6.32-rc1 and upwards Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14370] ext4 corruptions Rafael J. Wysocki
2009-10-12  6:50   ` Alexey Fisher
2009-10-12 21:53     ` Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14355] USB serial regression after 2.6.31.1 with Huawei E169 GSM modem Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14353] BUG: sleeping function called from invalid context at kernel/mutex.c:280 Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14373] Task blocked for more than 120 seconds Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14372] Wireless not working after suspend-resume Rafael J. Wysocki
2009-10-12 18:48   ` Fabio Comolli
2009-10-12 21:55     ` Rafael J. Wysocki
2009-10-13  7:07     ` Maciej Rutecki
2009-10-11 22:22 ` [Bug #14374] MCEs caused by commit db8be50c4307dac2b37305fc59c8dc0f978d09ea Rafael J. Wysocki
2009-10-12 13:35   ` Mikael Pettersson
2009-10-12 21:56     ` Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14378] Problems with net/core/skbuff.c Rafael J. Wysocki
2009-10-12 10:42   ` David Miller
2009-10-12 15:07     ` Massimo "CtRiX" Cetra
2009-10-13  9:11     ` 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
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
2009-10-13 10:22       ` [Bug #14378] Problems with net/core/skbuff.c David Miller
2009-10-13 10:27         ` Massimo Cetra
2009-10-11 22:22 ` [Bug #14376] Kernel NULL pointer dereference/ kvm subsystem Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14375] Intel(R) I/OAT DMA Engine init failed Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14379] ACPI Warning for _SB_.BAT0._BIF: Converted Buffer to expected String Rafael J. Wysocki
2009-10-12  3:14   ` Justin Mattock
2009-10-12  3:35     ` Lin Ming
2009-10-12  3:58       ` Justin P. Mattock
2009-10-12 21:58         ` Rafael J. Wysocki
2009-10-13  3:12           ` Justin P. Mattock
2009-10-11 22:22 ` [Bug #14380] Video tearing/glitching with T400 laptops Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14382] Transmit failure in et131x Rafael J. Wysocki
2009-10-11 22:30   ` Alan Cox
2009-10-11 22:22 ` [Bug #14381] iwlagn lost connection after s2ram (with warnings) Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14386] GPF in snd_hda_intel Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14383] hackbench regression with kernel 2.6.32-rc1 Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14384] tbench regression with 2.6.32-rc1 Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14387] deadlock with fallocate Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14390] "bind" a device to a driver doesn't not work anymore Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14389] Build system issue Rafael J. Wysocki
2009-10-13 18:53   ` Sam Ravnborg
2009-10-13 20:52     ` Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14392] Touchpad "paste" stops working after suspend to RAM Rafael J. Wysocki
2009-10-11 23:07 ` 2.6.32-rc4: Reported regressions from 2.6.31 Linus Torvalds
2009-10-12 10:18   ` David Woodhouse
2009-10-12 12:06     ` [PATCH 1/4] Rename pci_init() to pci_apply_final_quirks(), move it to quirks.c David Woodhouse
2009-10-12 12:06     ` [PATCH 2/4] Mark pci_apply_final_quirks() __init rather than __devinit David Woodhouse
2009-10-12 12:06     ` [PATCH 3/4] Run pci_apply_final_quirks() sooner David Woodhouse
2009-10-12 12:06     ` [PATCH 4/4] x86: Move pci_iommu_init to rootfs_initcall() David Woodhouse
2009-10-12 14:26     ` 2.6.32-rc4: Reported regressions from 2.6.31 David Woodhouse
2009-10-12 15:24     ` Linus Torvalds
2009-10-12 15:56       ` David Woodhouse
2009-10-12 16:13         ` Alan Cox
2009-10-12 17:35         ` Linus Torvalds
2009-10-12 20:29           ` David Woodhouse
2009-10-11 23:11 ` Linus Torvalds
2009-10-12  0:02   ` Theodore Tso
  -- strict thread matches above, loose matches on Subject: below --
2009-10-26 18:45 2.6.32-rc5-git3: " Rafael J. Wysocki
2009-10-26 18:55 ` [Bug #14378] Problems with net/core/skbuff.c Rafael J. Wysocki
2009-10-26 19:50   ` Eric Dumazet
2009-10-26 20:57     ` Rafael J. Wysocki

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