From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764769AbZD3RK0 (ORCPT ); Thu, 30 Apr 2009 13:10:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764092AbZD3RHW (ORCPT ); Thu, 30 Apr 2009 13:07:22 -0400 Received: from kroah.org ([198.145.64.141]:56161 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764135AbZD3RHR (ORCPT ); Thu, 30 Apr 2009 13:07:17 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Thu Apr 30 09:57:39 2009 Message-Id: <20090430165739.374897985@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Thu, 30 Apr 2009 09:55:56 -0700 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 , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Stephen Hemminger , "David S. Miller" Subject: [patch 07/88] bridge: bad error handling when adding invalid ether address References: <20090430165549.117010404@mini.kroah.org> Content-Disposition: inline; filename=bridge-bad-error-handling-when-adding-invalid-ether-address.patch In-Reply-To: <20090430170122.GA16015@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.28-stable review patch. If anyone has any objections, please let us know. ------------------ From: Stephen Hemminger [ Upstream commit cda6d377ec6b2ee2e58d563d0bd7eb313e0165df ] This fixes an crash when empty bond device is added to a bridge. If an interface with invalid ethernet address (all zero) is added to a bridge, then bridge code detects it when setting up the forward databas entry. But the error unwind is broken, the bridge port object can get freed twice: once when ref count went to zeo, and once by kfree. Since object is never really accessible, just free it. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/bridge/br_if.c | 1 - 1 file changed, 1 deletion(-) --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -426,7 +426,6 @@ err2: err1: kobject_del(&p->kobj); err0: - kobject_put(&p->kobj); dev_set_promiscuity(dev, -1); put_back: dev_put(dev);