Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2062995pxb; Sat, 23 Jan 2021 15:41:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJymyj77Buf2fgkjtklypNkYAi1XWIMfUJrez6J9GLD9MPMwmSPRSr4pZ9KBe6HEZuWy2W29 X-Received: by 2002:a50:fd83:: with SMTP id o3mr612653edt.359.1611445282087; Sat, 23 Jan 2021 15:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611445282; cv=none; d=google.com; s=arc-20160816; b=iec0tCH0EPmimhBneG2+QRDw10+KV7j/8CBVltZeENklkZPZmtYOuYwCdNWDNrosJS sIEYBZ+n+E40B8bZ3BhGK815eZi/wXyw25FPWEykoJanniBFa11RbnnfZupeArhCo06P rRmSQe7ER2yzXf9CA0vaRUJ6gVeNJsSkHtV2mnJHatMkAkspquUPV0xggmN5RyaU4Xrk o/WgL4/1ang/pHuMOXkc1OUUB9ZrvY8WVZpropa8BhKiJ1I0aa+qfQ0xTj4O+3mGAE1F eBpCF4BIhjeqPMVo9w1kIsgMjQMo42pGz3KDu4/izXso9izmm/vHUwkyfTR+JpzDXqnZ yYng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=Rlm8XFphD/t2Gle5s8Hwr/AAQgG7hLV82Tqn2NZu6Qg=; b=WcqxblYKXXC0UPOZD/UyJxscbSlI7sGv9zORqeYC/g76FNDf/SECzAEusBHjmoLp1a J/EtaV9aPBSIxB21p8Z+t48G9Yjx+YaT1rnOyJfBp1ZOpAFPq/NVTBhSeTjgI8Ssp1/b P1SLK3xaVKS5LUrdLtTSGk4lHd5j9+l39FewxsNH+00tCLXkYCVHAAlfzgC5jtzeyRF7 EZEfFJ5CXZkh2MXzL6OtF7zQ8ESv37rToYLRYgFv5m4sjUs4/Hr+9MJdhf3ItBYMJlw8 cwRtVYkXIUw6JqiRW+XQ0Xk4GeCCI8LOAEeM7BeddiZ+DqFGqBjFjesbQhqU71f7lx/t n8aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XJqrNgty; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si5465650edz.486.2021.01.23.15.40.59; Sat, 23 Jan 2021 15:41:22 -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=@google.com header.s=20161025 header.b=XJqrNgty; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726398AbhAWXjG (ORCPT + 99 others); Sat, 23 Jan 2021 18:39:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbhAWXjB (ORCPT ); Sat, 23 Jan 2021 18:39:01 -0500 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AFEAC061788 for ; Sat, 23 Jan 2021 15:38:21 -0800 (PST) Received: by mail-oo1-xc2f.google.com with SMTP id n19so999654ooj.11 for ; Sat, 23 Jan 2021 15:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Rlm8XFphD/t2Gle5s8Hwr/AAQgG7hLV82Tqn2NZu6Qg=; b=XJqrNgty2eyGWWlLQczKmvOzhfipC+EHiAo88rz+txoH8wuDzBLSGWl+e9Pzvco27P 7YWaj3kJ5CbLthO2hM0+G+/lilTXKAObwW1iIhC7VsNFpj0BP4EVpBJe7enRXx8+PZ1k Ws8N6osNrrudSSRCQg/9W0JZeTDTIW43M3l6XZLXpIGEBVArhZuWvWfWTTCQmhkOG0SJ GCrqwF6QgK6a/iGq5SYjew922q9HsjmshqoKEfQ9MbAHiCjr22Pe2CeIq68bBeHXClte xd+r0s6feiHuiGP/XH2PnNzqSUjfQuw6Ecz86UYKfp0xWxk0g2jjgqUAx9Cz9I/pXwz4 sxjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Rlm8XFphD/t2Gle5s8Hwr/AAQgG7hLV82Tqn2NZu6Qg=; b=XnXFFWzPZ1t2eC9QnF/GHrxf6FbEpr7me2YehgDAYvTUt+UGrlk2oSUevzNXHO69qY OhBQihKqkxHQc9SpX+MhSDFNp46vzwTStzaKExgrymmicoFTUnB+2wX2xBbCES3uSwJz n+BETWlDWsacipKAosjMjFo0IAiw8pkV81MAWRLSsxORue0QadOol4bQkVEJpKkLyIla b6zb5upQjZckZLSneko2L/xQGfucZv22YcCohh4dHij2BxBIhtdH5Z/arytwRjD9Z74z PXcibSDNjw4q7joLH95iwAr0fahy9OJ0DyLOiPQLi2MMRztDrfPz8aG4CYZnrUHu7mWj eOww== X-Gm-Message-State: AOAM5306rgTw8O0oGCc8AxRexS02sksBg+sNfuuW1PYzvkxbBnc111KH 7G1X2ylI5cp668tQWFPslPnutw== X-Received: by 2002:a4a:81:: with SMTP id 123mr8283884ooh.46.1611445100271; Sat, 23 Jan 2021 15:38:20 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id t16sm2583775otq.17.2021.01.23.15.38.18 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sat, 23 Jan 2021 15:38:19 -0800 (PST) Date: Sat, 23 Jan 2021 15:37:30 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Greg Kroah-Hartman , "Rafael J. Wysocki" cc: 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 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). Thanks, Hugh