Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758137AbXLKXpG (ORCPT ); Tue, 11 Dec 2007 18:45:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755421AbXLKXov (ORCPT ); Tue, 11 Dec 2007 18:44:51 -0500 Received: from smtp2.linux-foundation.org ([207.189.120.14]:34943 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbXLKXou (ORCPT ); Tue, 11 Dec 2007 18:44:50 -0500 Date: Tue, 11 Dec 2007 15:42:22 -0800 From: Stephen Hemminger To: "Joonwoo Park" Cc: "Brandeburg, Jesse" , "David Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, "Kok, Auke-jan H" Subject: Re: [PATCH] [NET]: Fix Ooops of napi net_rx_action. Message-ID: <20071211154222.0aec68fc@freepuppy.rosehill> In-Reply-To: References: <001801c83bd6$2001d410$9c94fea9@jason> <20071211.023218.31965443.davem@davemloft.net> <36D9DB17C6DE9E40B059440DB8D95F5203F82FC3@orsmsx418.amr.corp.intel.com> Organization: Linux Foundation X-Mailer: Claws Mail 3.1.0 (GTK+ 2.12.1; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 820 Lines: 26 Perhaps we should change the warning to identify the guilty device. --- a/net/core/dev.c 2007-11-19 09:09:57.000000000 -0800 +++ b/net/core/dev.c 2007-12-07 15:54:03.000000000 -0800 @@ -2196,7 +2196,13 @@ static void net_rx_action(struct softirq if (test_bit(NAPI_STATE_SCHED, &n->state)) work = n->poll(n, weight); - WARN_ON_ONCE(work > weight); + if (unlikely(work > weight)) { + if (net_ratelimit()) + printk(KERN_WARNING + "%s: driver poll bug (work=%d weight=%d)\n", + work, weight); + work = weight; + } budget -= work; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/