From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765834AbXKOG1w (ORCPT ); Thu, 15 Nov 2007 01:27:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764609AbXKOGWI (ORCPT ); Thu, 15 Nov 2007 01:22:08 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:45944 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764150AbXKOGWG (ORCPT ); Thu, 15 Nov 2007 01:22:06 -0500 Date: Wed, 14 Nov 2007 22:20:35 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, bunk@kernel.org, Evgeniy Polyakov , "David S. Miller" Subject: [patch 10/23] Fix TEQL oops. Message-ID: <20071115062035.GK8282@kroah.com> References: <20071115055238.692814352@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="fix-teql-oops.patch" In-Reply-To: <20071115061806.GA8282@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org -stable review patch. If anyone has any objections, please let us know. ------------------ From: Evgeniy Polyakov [PKT_SCHED]: Fix OOPS when removing devices from a teql queuing discipline [ Upstream commit: 4f9f8311a08c0d95c70261264a2b47f2ae99683a ] tecl_reset() is called from deactivate and qdisc is set to noop already, but subsequent teql_xmit does not know about it and dereference private data as teql qdisc and thus oopses. not catch it first :) Signed-off-by: Evgeniy Polyakov Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sched/sch_teql.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c @@ -249,6 +249,9 @@ __teql_resolve(struct sk_buff *skb, stru static __inline__ int teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev) { + if (dev->qdisc == &noop_qdisc) + return -ENODEV; + if (dev->hard_header == NULL || skb->dst == NULL || skb->dst->neighbour == NULL) --