From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D9DEC433E6 for ; Sun, 24 Jan 2021 20:08:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E561022D58 for ; Sun, 24 Jan 2021 20:08:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726292AbhAXUHx (ORCPT ); Sun, 24 Jan 2021 15:07:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbhAXUHt (ORCPT ); Sun, 24 Jan 2021 15:07:49 -0500 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05A64C06174A for ; Sun, 24 Jan 2021 12:07:08 -0800 (PST) Received: by mail-ot1-x32d.google.com with SMTP id 63so10780766oty.0 for ; Sun, 24 Jan 2021 12:07:08 -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=+wHtxvtC1jI/nW4txRp0ZVFK13xVD/e5tlgnnpJhrT4=; b=B/QLKbHQOWdsoFbigku1iPJMvRLlLy+1TmxPksBRa+/6POLJXMaf5d5r6YsgrPiEoo 7EIQUKkWyEyYrAofrEJUMo5LgTxq9C5ggTi2ZUdomWqah2G2pILJ7/ZzL2SkQHFdnrnU KmJX5+7ArMjRrsVwmpma1f6kpwEADEHM5cZ8vJ2cubwQNRuO9FzRld5NVoZmLl1bx64/ 4+LvkXd1VFbh979akhsraEnpq25toxFpyGxoDBY2u5lI3qKDo1HcpCV6JHSMffFXw0AI ePvFODKlkCcezc/DrDPL8f1RU+Pn8RU3taLT+iHvlOl4kmH9hcTIBx9Y1iNSMzxrK1/Q RiMA== 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=+wHtxvtC1jI/nW4txRp0ZVFK13xVD/e5tlgnnpJhrT4=; b=BPDTdsjJ/Y86afpV9SxaIq5U9wZHtO98vXB5EUOEtH3R9rsHdMaLdZ0LX2FRqQIcwz BHlIkz/yeCXWsn6SfLTkpLrGE+GIznTyh+kXQupYUYoQOqMJDwn0ozDzzUzBLnXBa7fn KTDeHcnJ680qK7+E9H+rw/CvFSdfFXN249BxawNiXwgp142WdQ6lr83FpGVjC9aGhqg3 LmLPVWLgqG9rsAIuud0vAwpRksY2D04hgOHPeADVXAaLyFlxljWjkshbEsEhvcJpnhpv ef0X62XvClk4YF/K4qpHCvP2EXkfSbBdEIZUa5/SRwIqdT8dl8g1C7DzVW/lu6vbWIPi CbXg== X-Gm-Message-State: AOAM532kxN7OQrRGnAgt0JNRIE5Ph7tpggwHXbaxdldJ9EPPiyAncxIR Py0TLFnLw0BRVMwVSANav8QZRQ== X-Google-Smtp-Source: ABdhPJwkjeguUQQq8ExODbw+xBALYdofTAdvUgePeXABnj2QpaJq5Qo/5Rp/MaDPboyRQtCXP5fbNw== X-Received: by 2002:a05:6830:2152:: with SMTP id r18mr10445402otd.296.1611518827927; Sun, 24 Jan 2021 12:07:07 -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 k15sm3058068otp.10.2021.01.24.12.07.06 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sun, 24 Jan 2021 12:07:07 -0800 (PST) Date: Sun, 24 Jan 2021 12:06:54 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Greg Kroah-Hartman cc: Hugh Dickins , "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 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 Sun, 24 Jan 2021, Greg Kroah-Hartman wrote: > 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 :) And indeed it's now in, thanks Greg: I'm sorry for being importunate, the misunderstanding was mine. Hugh