From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751711AbdJTGV5 (ORCPT ); Fri, 20 Oct 2017 02:21:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46210 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbdJTGV4 (ORCPT ); Fri, 20 Oct 2017 02:21:56 -0400 Date: Fri, 20 Oct 2017 08:22:01 +0200 From: Greg KH To: "Rafael J. Wysocki" Cc: Jeffy Chen , linux-kernel@vger.kernel.org, briannorris@chromium.org, heiko@sntech.de, dmitry.torokhov@gmail.com, dianders@chromium.org, tfiga@chromium.org, broonie@kernel.org, seanpaul@chromium.org, thierry.reding@gmail.com Subject: Re: [PATCH v3] driver core: Move device_links_purge() after bus_remove_device() Message-ID: <20171020062201.GA18761@kroah.com> References: <20171020012316.30154-1-jeffy.chen@rock-chips.com> <3413769.dlVTNxayVy@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3413769.dlVTNxayVy@aspire.rjw.lan> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 20, 2017 at 03:22:07AM +0200, Rafael J. Wysocki wrote: > On Friday, October 20, 2017 3:23:16 AM CEST Jeffy Chen wrote: > > The current ordering of code in device_del() triggers a WARN_ON() > > in device_links_purge(), because of an unexpected link status. > > > > The device_links_unbind_consumers() call in device_release_driver() > > has to take place before device_links_purge() for the status of all > > links to be correct, so move the device_links_purge() call in > > device_del() after the invocation of bus_remove_device() which calls > > device_release_driver(). > > > > Signed-off-by: Jeffy Chen > > Reviewed-by: Rafael J. Wysocki > > OK, thanks. > > Greg, will you take this? Yes I will. But I don't understand if this is a bugfix that needs to go to all stable kernels to resolve a problem that has always been there, or it is ok for 4.15-rc1, as it's just a "do things in the correct order" type of change. Any hints? thanks, greg k-h