kernel-testers.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Massimo Cetra <mcetra-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org>
Cc: Massimo Cetra <ctrixk-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org>,
	David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	rjw-KKrjLPT3xs0@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs()
Date: Thu, 15 Oct 2009 02:36:43 +0200	[thread overview]
Message-ID: <4AD66E9B.2020803@gmail.com> (raw)
In-Reply-To: <4AD62626.6010709-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org>

Massimo Cetra a écrit :
> Eric,
> thanks for the patch.
> The problem didn't arise again and i haven't seen any warning like that
> on both servers where that problem was happening more frequently.
> 
> I would say that it's fixed and if it's not, i'll let you know as soon
> as it happens again.
> 

Thanks Massimo, I think patch is reasonably safe and should be taken as is :


[PATCH] virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs()

Because netpoll can call netdevice start_xmit() method with
irqs disabled, drivers should not call kfree_skb() from
their start_xmit(), but use dev_kfree_skb_any() instead.

Oct  8 11:16:52 172.30.1.31 [113074.791813] ------------[ cut here ]------------
Oct  8 11:16:52 172.30.1.31 [113074.791813] WARNING: at net/core/skbuff.c:398 \
                skb_release_head_state+0x64/0xc8()
Oct  8 11:16:52 172.30.1.31 [113074.791813] Hardware name: 
Oct  8 11:16:52 172.30.1.31 [113074.791813] Modules linked in: netconsole ocfs2 jbd2 quota_tree \
ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue configfs crc32c drbd cn loop \
serio_raw psmouse snd_pcm snd_timer snd soundcore snd_page_alloc virtio_net pcspkr parport_pc parport \
i2c_piix4 i2c_core button processor evdev ext3 jbd mbcache dm_mirror dm_region_hash dm_log dm_snapshot \
dm_mod ide_cd_mod cdrom ata_generic ata_piix virtio_blk libata scsi_mod piix ide_pci_generic ide_core \
                virtio_pci virtio_ring virtio floppy thermal fan thermal_sys [last unloaded: netconsole]
Oct  8 11:16:52 172.30.1.31 [113074.791813] Pid: 11132, comm: php5-cgi Tainted: G        W  \
                2.6.31.2-vserver #1
Oct  8 11:16:52 172.30.1.31 [113074.791813] Call Trace:
Oct  8 11:16:52 172.30.1.31 [113074.791813] <IRQ>  [<ffffffff81253cd5>] ? \
                skb_release_head_state+0x64/0xc8
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81253cd5>] ? skb_release_head_state+0x64/0xc8
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81049ae1>] ? warn_slowpath_common+0x77/0xa3
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81253cd5>] ? skb_release_head_state+0x64/0xc8
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81253a1a>] ? __kfree_skb+0x9/0x7d
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffffa01cb139>] ? free_old_xmit_skbs+0x51/0x6e \
                [virtio_net]
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffffa01cbc85>] ? start_xmit+0x26/0xf2 [virtio_net]
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8126934f>] ? netpoll_send_skb+0xd2/0x205
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffffa0429216>] ? write_msg+0x90/0xeb [netconsole]
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81049f06>] ? __call_console_drivers+0x5e/0x6f
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8102b49d>] ? kvm_clock_read+0x4d/0x52
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8104a082>] ? release_console_sem+0x115/0x1ba
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8104a632>] ? vprintk+0x2f2/0x34b
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8106b142>] ? vx_update_load+0x18/0x13e
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81308309>] ? printk+0x4e/0x5d
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff8102b49d>] ? kvm_clock_read+0x4d/0x52
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81070b62>] ? getnstimeofday+0x55/0xaf
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81062683>] ? ktime_get_ts+0x21/0x49
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff810626b7>] ? ktime_get+0xc/0x41
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81062788>] ? hrtimer_interrupt+0x9c/0x146
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81024a4b>] ? smp_apic_timer_interrupt+0x80/0x93
Oct  8 11:16:52 172.30.1.31 [113074.791813] [<ffffffff81011663>] ? apic_timer_interrupt+0x13/0x20
Oct  8 11:16:52 172.30.1.31 [113074.791813] <EOI>  [<ffffffff8130a9eb>] ? _spin_unlock_irq+0xd/0x31

Reported-and-tested-by: Massimo Cetra <mcetra-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org>
Signed-off-by: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Bug-Entry: http://bugzilla.kernel.org/show_bug.cgi?id=14378
---

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-15  0:36 UTC|newest]

Thread overview: 64+ 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 #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
     [not found]     ` <4AD30073020000780001938F-Qfbpwmsw6RoS3W1tAdPHOtBPR1lH4CV8@public.gmane.org>
2009-10-12 21:50       ` 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
     [not found]     ` <200910121515.49393.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2009-10-12 21:49       ` Rafael J. Wysocki
     [not found]         ` <200910122349.39408.rjw-KKrjLPT3xs0@public.gmane.org>
2009-10-13 14:27           ` John W. Linville
     [not found]             ` <20091013142726.GA2747-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2009-10-13 20:50               ` 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 #14352] WARNING: at net/mac80211/scan.c:267 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 #14298] warning at manage.c:361 (set_irq_wake), matrix-keypad related? 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 #14353] BUG: sleeping function called from invalid context at kernel/mutex.c:280 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 #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 #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 #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 #14373] Task blocked for more than 120 seconds 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
2009-10-13 10:25         ` David Miller
     [not found]         ` <4AD455E4.2070105@navynet.it>
2009-10-14 19:27           ` Massimo Cetra
     [not found]             ` <4AD62626.6010709-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org>
2009-10-15  0:36               ` Eric Dumazet [this message]
2009-10-15  6:30                 ` [PATCH] virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs() 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
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
     [not found]     ` <dd18b0c30910112014m4bfdc238j542864bb9f1e8161-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-12  3:35       ` Lin Ming
2009-10-12  3:58         ` Justin P. Mattock
2009-10-12 21:58           ` Rafael J. Wysocki
     [not found]             ` <200910122358.42255.rjw-KKrjLPT3xs0@public.gmane.org>
2009-10-13  3:12               ` Justin P. Mattock
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 #14380] Video tearing/glitching with T400 laptops Rafael J. Wysocki
2009-10-11 22:22 ` [Bug #14381] iwlagn lost connection after s2ram (with warnings) 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 #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 #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 #14392] Touchpad "paste" stops working after suspend to RAM 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

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=4AD66E9B.2020803@gmail.com \
    --to=eric.dumazet-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=ctrixk-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mcetra-BBpJ+9iBSNKonA0d6jMUrA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.org \
    /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).