Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932168AbZLDQuw (ORCPT ); Fri, 4 Dec 2009 11:50:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756648AbZLDQuv (ORCPT ); Fri, 4 Dec 2009 11:50:51 -0500 Received: from cantor2.suse.de ([195.135.220.15]:32821 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756546AbZLDQuu (ORCPT ); Fri, 4 Dec 2009 11:50:50 -0500 Date: Fri, 4 Dec 2009 08:50:40 -0800 From: Greg KH To: Oliver Neukum Cc: Alan Stern , stable@kernel.org, Rickard Bellini , "linux-usb@vger.kernel.org" , Torgny Johansson , Kernel development list Subject: Re: [PATCH] Driver core: fix race in dev_driver_string Message-ID: <20091204165040.GB2180@suse.de> References: <200912041716.19329.oliver@neukum.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912041716.19329.oliver@neukum.org> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 28 On Fri, Dec 04, 2009 at 05:16:19PM +0100, Oliver Neukum wrote: > Am Freitag, 4. Dezember 2009 17:06:57 schrieb Alan Stern: > > Oliver: > > > > We don't have to worry about the device structure being deallocated > > while the routine is running. If that happens it's a bug in the > > caller: improper refcounting. > > That raises two points > > 1. am I supposed to get a reference just so that I can use dev_err? No, you should already have a reference on the device when doing the call, right? > 2. what happens if this is a soft disconnect and the device is reconnected? > It seems to me that you'd print the wrong driver's name. Then we can live with that, it's not that big of a deal. thanks, greg k-h -- 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/