Received: with ECARTIS (v1.0.0; list netdev); Tue, 27 May 2003 09:51:54 -0700 (PDT) Received: from mail.osdl.org (air-2.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h4RGpg2x006762 for ; Tue, 27 May 2003 09:51:45 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id h4RGpTX27530; Tue, 27 May 2003 09:51:29 -0700 Date: Tue, 27 May 2003 09:51:29 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: muizelaar@rogers.com, netdev@oss.sgi.com Subject: Re: [PATCH] post-sysfs netdev cleanup Message-Id: <20030527095129.4bddbc51.shemminger@osdl.org> In-Reply-To: <20030525.192417.102551586.davem@redhat.com> References: <3ECD6E2D.5090000@rogers.com> <20030522.174415.28799441.davem@redhat.com> <3ECEB317.5020407@osdl.org> <20030525.192417.102551586.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.8.11 (GTK+ 1.2.10; i686-pc-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 2726 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: shemminger@osdl.org Precedence: bulk X-list: netdev On Sun, 25 May 2003 19:24:17 -0700 (PDT) "David S. Miller" wrote: > From: Stephen Hemminger > Date: Fri, 23 May 2003 16:47:35 -0700 > > Seems like a good idea too. > > Ok, great. > > Stephen, I think we need to find a way to put the device > registration call outside of the RTNL semaphore. I removed > in the unregister case, but to be complete we have to push it out in > the register path too. > > The reason for all of these issues is that link_watch grabs the RTNL > semaphore, and this runs via keventd. Thus, trying to invoke any > usermode helper (/sbin/hotplug etc.) while holding the RTNL semaphore > can deadlock. There needs to be some locking in the registration path doesn't there to prevent two calls to register the same name and other possible conflicts. So do you want to use dev_base lock or some other locking?