Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2577092pxb; Sun, 24 Jan 2021 12:08:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjKA7bznfU4541r6JT6oMzDK/9PGQjWlZuY2OcgYRFtKdmStaypkJ4xJfYelWP4OqPv/Va X-Received: by 2002:a05:6402:11d3:: with SMTP id j19mr218505edw.314.1611518934965; Sun, 24 Jan 2021 12:08:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611518934; cv=none; d=google.com; s=arc-20160816; b=cAdN+kb7zC2lBvoNMoBUTzTu1y89vctu8uN/vCmbFXFYuOnCaBE/fsAOGZ6Cj9HawJ Z52+I1cOQAlj2E+Cw6gjK0UaiACmwxvFUjzVvvLaSQyGVq/ex5v2UfMTPXezgM7IZTzf KATVrbPcO8MYgWl0tUGLi3LRMNs734hS6+FJFsjOqFIaHaF6RB2pD1/Ayre9OKXqn98z Souy6niK3hMchv1NQGyndWUZLJ8Q7uDqwyOmBonlhj525M8MY5IJVKRDaoMGky/RD0hH i8gGWBOzF+Q6YbjwSJXXUCkvkYFatRxcuNx7TrfEOWXVt0LBiBeGGJeo5sqaIIFHeXbc 73Xg== 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=+wHtxvtC1jI/nW4txRp0ZVFK13xVD/e5tlgnnpJhrT4=; b=FKHQRFvU1uOo5olYzLj+tFaqSXK6ZXWPpLQttWVeWsGLkTG+Q4yoHpwtPty0gzGaZD vn6fMFe7tmA0JszdSIH21PBBKqJqWtVeEDRRx5iFQ+Uf3npxFLPDyA4XLhhWsc5X+Cuf THbKr0tM87+yXx6Ef7BuXFE0vjXVFD9f05jatcGgNzaoGQfpwMGWvp0fL/hfs8h5umeu ecTQ0o+vmol4Tc1rHbWxlqE20lb+jL6IbYUzVuASdM+VgYxc1dI3GvxJUCDAcUZBP+nB ADorqhhp4FC4D80LB87BmFWwwYzABgYUEA2PD54sReVXRkl0Nq+0yTyCNc8EnqkOZXXi 7+Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="B/QLKbHQ"; 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 x19si6460854eds.79.2021.01.24.12.08.25; Sun, 24 Jan 2021 12:08:54 -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="B/QLKbHQ"; 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 S1725986AbhAXUHw (ORCPT + 99 others); Sun, 24 Jan 2021 15:07:52 -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-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