Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753464AbXFNGHy (ORCPT ); Thu, 14 Jun 2007 02:07:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751673AbXFNGHo (ORCPT ); Thu, 14 Jun 2007 02:07:44 -0400 Received: from noname.neutralserver.com ([70.84.186.210]:39613 "EHLO noname.neutralserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbXFNGHn (ORCPT ); Thu, 14 Jun 2007 02:07:43 -0400 Date: Thu, 14 Jun 2007 09:07:38 +0300 From: Dan Aloni To: Stephen Hemminger Cc: Kenji Kaneshige , "David S. Miller" , netdev@vger.kernel.org, linux-kernel , Andrew Morton Subject: Re: [PATCH] Fix race condition about network device name allocation Message-ID: <20070614060738.GA10095@localdomain> References: <1178862045.3979.33.camel@kane-linux> <20070511092519.1f34ab34@freepuppy> <1179130660.3881.23.camel@kane-linux> <20070514085840.17a343f7@freepuppy> <20070613094521.GA8860@localdomain> <20070613093631.42a45916@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070613093631.42a45916@localhost> User-Agent: Mutt/1.5.13 (2006-08-11) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - noname.neutralserver.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - monatomic.org X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1395 Lines: 38 On Wed, Jun 13, 2007 at 09:36:31AM -0700, Stephen Hemminger wrote: > On Wed, 13 Jun 2007 12:45:21 +0300 > Dan Aloni wrote: > > > On Mon, May 14, 2007 at 08:58:40AM -0700, Stephen Hemminger wrote: > > > Kenji Kaneshige found this race between device removal and > > > registration. On unregister it is possible for the old device to > > > exist, because sysfs file is still open. A new device with 'eth%d' > > > will select the same name, but sysfs kobject register will fial. > > > > > > The following changes the shutdown order slightly. It hold a removes the sysfs > > > entries earlier (on unregister_netdevice), but holds a kobject reference. > > > Then when todo runs the actual last put free happens. > > > > > > Signed-off-by: Stephen Hemminger > > > > That patch breaks the bonding driver. After reverting it I avoid this crash: > > >[..] > > > > I assume this happens when bonded slave device is removed? Yes, it's just a simple removal via sysfs. > Which kernel version? 2.6.21.5 -- Dan Aloni XIV LTD, http://www.xivstorage.com da-x (at) monatomic.org, dan (at) xiv.co.il - 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/