From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 27 Nov 2013 13:56:34 -0500 From: Tejun Heo To: "Rafael J. Wysocki" Cc: Mika Westerberg , Greg Kroah-Hartman , Bjorn Helgaas , "linux-kernel@vger.kernel.org" , "James E.J. Bottomley" , linux-ide@vger.kernel.org, Linux PCI Subject: Re: [PATCH] ATA: Fix port removal ordering Message-ID: <20131127185634.GD13098@mtj.dyndns.org> References: <1384866598-19716-1-git-send-email-mika.westerberg@linux.intel.com> <3805095.rqdZNnA0Ng@vostro.rjw.lan> <20131125101154.GS2281@intel.com> <9509557.LMLHG8ie3T@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <9509557.LMLHG8ie3T@vostro.rjw.lan> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Mon, Nov 25, 2013 at 01:19:01PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > After commit bcdde7e221a8 (sysfs: make __sysfs_remove_dir() recursive) > Mika Westerberg sees traces analogous to the one below in Thunderbolt > hot-remove testing: ... > The source of this problem is that SCSI hosts are removed from > ATA ports after calling ata_tport_delete() which removes the > port's sysfs directory, among other things. Now, after commit > bcdde7e221a8, the sysfs directory is removed along with all of > its subdirectories that include the SCSI host's sysfs directory > and its subdirectories at this point. Consequently, when > device_del() is finally called for any child device of the SCSI > host and tries to remove its "power" group (which is already > gone then), it triggers the above warning. > > To make the warnings go away, change the removal ordering in > ata_port_detach() so that the SCSI host is removed from the > port before ata_tport_delete() is called. > > References: https://bugzilla.kernel.org/show_bug.cgi?id=65281 > Reported-and-tested-by: Mika Westerberg > Signed-off-by: Rafael J. Wysocki Applied to libata/for-3.13-fixes. Thanks! -- tejun