Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2251495pxb; Sun, 24 Jan 2021 00:17:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbf8Y2SUbq65+6enioNcGYTdjnfCNS9fm9c8PYqz8WJOXNoY7q0gDILa+Y/uAsXW7JuSRp X-Received: by 2002:a05:6402:306a:: with SMTP id bs10mr330909edb.209.1611476225354; Sun, 24 Jan 2021 00:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611476225; cv=none; d=google.com; s=arc-20160816; b=AjPkTau4cR8H4S08ztNkCFEopr9EmiihoAY9uJI2/WOs2T61xcdELOjm9xYO15gdG9 h5lCGPfOOE78nKrk3w8TpQ0nfD6CqjerHGMORyhjC9cKdbETEuVb8PGfL1yTAp5pwny4 YIwt8a19cLtQFnh8rqbcSCBx6SU/AbJNOZx8MjDWLB0Ka/3HKw4gdoJ0F73mm8IjQ9/I MW7PnUY3Vqisxquk4p+ToTZYTrAimGGvka3ooO4FaswGcdlpd9prbuiI5hAj2B3PkmRb mxSoaLp+Xd8IOr79gN3+emKxy/qpyus6Y6fybkLFeFlW5mOXnpBkiVtzRI050fvxb1M4 HN3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5JHIanPuyfPefue66/EJutHl7+/EwxhaM/oRVJgWJcQ=; b=jCiIHNAF5+xNUHihSb+XeGfKeCmgMacCxA75H3NG0JvjqTUXXcxguuUgXsbeItsqdU fOcrFJJWpCGRgiIarIjS2KoO0SQSlSr4ANlmEYPRPlB3qgzUE7fvlkgk/wwqvtj9vwga m/OzeJiZ/J0KGa5KiMuu7oXQf92mGhhDwW91HuglM3AV3k2a0WeAMkLWBdcoaw+Jg7Ul USprReraF9zdOGDYfr6HFiS72zT7cA9rAZxIrXhiegPwn0CuVvGOEvDK66lfjPqJyZnS x0JMlHSDQdKsot2QoE6/S7CC2JLEOkV6p0zOpuSQ0N0gIvT5oK7E/Zii+8p9Lusju107 EJog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GVrZPRK2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si5780285edt.415.2021.01.24.00.16.42; Sun, 24 Jan 2021 00:17:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GVrZPRK2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726637AbhAXIOq (ORCPT + 99 others); Sun, 24 Jan 2021 03:14:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:48388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbhAXIOa (ORCPT ); Sun, 24 Jan 2021 03:14:30 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5055B22582; Sun, 24 Jan 2021 08:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611476028; bh=+S8i7tXq4gCZUj2yB3Crs9e2kW8EcJXUe2UEBs1rh0w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GVrZPRK2xV5GHODv5CgpRb40J8rVnGFLtz4LUnIRF3CVwWy3ipT+4QwvEr5hjldJj ywBQJi/LFovYP5/1qZSqEhUdG3B8FUlvL50w1sNoYZXDrkAcLlOAv8ktxUI2l10iA0 SDLfO68IM5s8EWAHu2APGUD0gqAkwhS+M9z+a1Io= Date: Sun, 24 Jan 2021 09:13:44 +0100 From: Greg Kroah-Hartman To: Hugh Dickins Cc: "Rafael J. Wysocki" , Stephan Gerhold , Linux Kernel Mailing List , Peter Chen , Kishon Vijay Abraham I , "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" , Thierry Reding , Saravana Kannan , linux-pm@vger.kernel.org Subject: Re: Infinite recursion in device_reorder_to_tail() due to circular device links Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 23, 2021 at 03:37:30PM -0800, Hugh Dickins wrote: > On Tue, 12 Jan 2021, Greg Kroah-Hartman wrote: > > On Tue, Jan 12, 2021 at 03:32:04PM +0100, Rafael J. Wysocki wrote: > > > On Mon, Jan 11, 2021 at 7:46 PM Stephan Gerhold wrote: > > > > > > > > Hi, > > > > > > > > since 5.11-rc1 I get kernel crashes with infinite recursion in > > > > device_reorder_to_tail() in some situations... It's a bit complicated to > > > > explain so I want to apologize in advance for the long mail. :) > > > > > > > > Kernel panic - not syncing: kernel stack overflow > > > > CPU: 1 PID: 33 Comm: kworker/1:1 Not tainted 5.11.0-rc3 #1 > > > > Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) > > > > Call trace: > > > > ... > > > > device_reorder_to_tail+0x4c/0xf0 > > > > device_reorder_to_tail+0x98/0xf0 > > > > device_reorder_to_tail+0x60/0xf0 > > > > device_reorder_to_tail+0x60/0xf0 > > > > device_reorder_to_tail+0x60/0xf0 > > > > ... > > > > > > > > The crash happens only in 5.11 with commit 5b6164d3465f ("driver core: > > > > Reorder devices on successful probe"). It stops happening when I revert > > > > this commit. > > > > > > Thanks for the report! > > > > > > Greg, please revert commit 5b6164d3465f, it clearly is not an > > > improvement, at least at this point. > > > > Now reverted, thanks. > > > > greg k-h > > I think that there has been a misunderstanding here: although > 5b6164d3465f ("driver core: Reorder devices on successful probe") > has been reverted from linux-next (thank you), it has not yet been > reverted from 5.11-rc, and still causing problems there (in my case, > not the infinite recursion Stephan reported in this thread, but the > ThinkPad rmi4 suspend failure that I reported in another thread). It will be sent to Linus in a few hours, thanks, so should show up in 5.11-rc5. I had other patches to go along with this to send him at the same time :) greg k-h