From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932143Ab1DLRb3 (ORCPT ); Tue, 12 Apr 2011 13:31:29 -0400 Received: from cantor.suse.de ([195.135.220.2]:53827 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757068Ab1DLRb2 (ORCPT ); Tue, 12 Apr 2011 13:31:28 -0400 Date: Tue, 12 Apr 2011 10:13:43 -0700 From: Greg KH To: Sebastian Ott Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] driver-core: fix race between device_register and driver_register Message-ID: <20110412171343.GA2745@suse.de> References: <20110411141309.GA8924@suse.de> <20110411144956.GA16610@suse.de> <20110411151947.GA17913@suse.de> <20110411175628.GA24301@suse.de> <20110412160220.GA28483@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 12, 2011 at 07:05:37PM +0200, Sebastian Ott wrote: > > When a device is registered to a bus it will be a) added to the list > of devices of the bus and b) bind to a driver (if one matches). As a > result of a driver being registered at this bus between a) and b) this > device could already be bound to a driver. This leads to a warning > and incorrect refcounting. > To fix this add a check to device_attach to identify an already bound > device. > > Signed-off-by: Sebastian Ott Thanks, I'll queue this up for .40. greg k-h