From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: softirq warnings when calling dev_kfree_skb_irq - bug in conntrack? Date: Mon, 02 Aug 2010 11:54:46 -0700 Message-ID: <4C571476.7070301@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Xu, Dongxiao" , "Xen-devel@lists.xensource.com" , Ian Campbell , Patrick McHardy , Eric Dumazet To: NetDev Return-path: Received: from claw.goop.org ([74.207.240.146]:34883 "EHLO claw.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754170Ab0HBSys (ORCPT ); Mon, 2 Aug 2010 14:54:48 -0400 Sender: netdev-owner@vger.kernel.org List-ID: Hi, I'm seeing this in the current linux-next tree: ------------[ cut here ]------------ WARNING: at kernel/softirq.c:143 local_bh_enable+0x40/0x87() Modules linked in: xt_state dm_mirror dm_region_hash dm_log microcode [last unloaded: scsi_wait_scan] Pid: 0, comm: swapper Not tainted 2.6.35-rc6-next-20100729+ #29 Call Trace: [] warn_slowpath_common+0x80/0x98 [] warn_slowpath_null+0x15/0x17 [] local_bh_enable+0x40/0x87 [] destroy_conntrack+0x78/0x9e [] ? __kmalloc_track_caller+0xc3/0x135 [] nf_conntrack_destroy+0x16/0x18 [] skb_release_head_state+0x97/0xd9 [] __kfree_skb+0x11/0x7a [] consume_skb+0x27/0x29 [] dev_kfree_skb_irq+0x18/0x62 [] xennet_tx_buf_gc+0xfc/0x192 [] smart_poll_function+0x50/0x121 [] ? smart_poll_function+0x0/0x121 [] __run_hrtimer+0xcc/0x127 [] hrtimer_interrupt+0x9c/0x17b [] xen_timer_interrupt+0x2a/0x13e [] ? check_events+0x12/0x22 [] ? xen_force_evtchn_callback+0xd/0xf [] ? xen_force_evtchn_callback+0xd/0xf [] handle_IRQ_event+0x52/0x119 [] handle_level_irq+0x6c/0xb2 [] __xen_evtchn_do_upcall+0xa9/0x12a [] ? xen_restore_fl_direct_end+0x0/0x1 [] xen_evtchn_do_upcall+0x28/0x39 [] xen_do_hypervisor_callback+0x1c/0x30 [] ? hypercall_page+0x3aa/0x1000 [] ? hypercall_page+0x3aa/0x1000 [] ? xen_safe_halt+0x10/0x1a [] ? xen_idle+0x38/0x44 [] ? cpu_idle+0x82/0xe9 [] ? rest_init+0x67/0x69 [] ? start_kernel+0x387/0x392 [] ? x86_64_start_reservations+0xb3/0xb7 [] ? xen_start_kernel+0x4be/0x4c2 ---[ end trace 755676650ea49003 ]--- The warning is: WARN_ON_ONCE(in_irq() || irqs_disabled()); It seems the basic problem is that xennet_tx_buf_gc() is being called in interrupt context - with smartpoll it's from the timer interrupt, but even without it is being called from xennet_interrupt(), which in turn calls dev_kfree_skb_irq(). Since this should be perfectly OK, it appears the problem is actually in conntrack. I'm not sure where this bug started happening, but its relatively recently I think. Thanks, J