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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3449ACCA47B for ; Tue, 5 Jul 2022 21:50:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232577AbiGEVuR (ORCPT ); Tue, 5 Jul 2022 17:50:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbiGEVuQ (ORCPT ); Tue, 5 Jul 2022 17:50:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0105F2AE9; Tue, 5 Jul 2022 14:50:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1DF9961CF4; Tue, 5 Jul 2022 21:50:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 6FE91C341CB; Tue, 5 Jul 2022 21:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657057813; bh=L+i1nEUDeFfTV1alPccsdJXl82/LOZYPtDeD9hQnN1Q=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=LFDWrrejLl4UZuC6wY1S6+EUa/jUlLFm89X0JSu40/yrxJAtdhSLnk/THEvHXuT0U aWxSprZEhypegt/yo3dqSIrd52ujt6BDxzRLw0ucTRWF9m6SS+boRP6+VH/LqKOAnQ NC1ZyOIQ2l2iZdDdAGHOtLf0mYHj1uB2ylw6zYZevSg5j5CpvVzhXpVyWcPeCRtpTe 5gky4x2WGUJjHhFuKGdrzJlqCfmz2jLxVK4LFECt5Tc6xLN0AvmQSUVlvp6ml4GQzv eUUQshoIvFFrO/EoSPG2OmKIIUVHBRhKSrA5cF1LqnWJp6/NNy8SIVMERaEiAyDgYH yMH8VqOG3KFBw== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 3CB1AE45BD8; Tue, 5 Jul 2022 21:50:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] Bluetooth: core: Fix deadlock due to `cancel_work_sync(&hdev->power_on)` from hci_power_on_sync. From: patchwork-bot+netdevbpf@kernel.org Message-Id: <165705781323.1977.3304816866885746199.git-patchwork-notify@kernel.org> Date: Tue, 05 Jul 2022 21:50:13 +0000 References: <20220705125931.3601-1-vasyl.vavrychuk@opensynergy.com> In-Reply-To: <20220705125931.3601-1-vasyl.vavrychuk@opensynergy.com> To: Vasyl Vavrychuk Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-bluetooth@vger.kernel.org, max.oss.09@gmail.com, francesco.dolcini@toradex.com, mat.jonczyk@o2.pl, kuba@kernel.org, marcel@holtmann.org, max.krummenacher@toradex.com, johan.hedberg@gmail.com, luiz.dentz@gmail.com, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hello: This patch was applied to netdev/net.git (master) by Luiz Augusto von Dentz : On Tue, 5 Jul 2022 15:59:31 +0300 you wrote: > `cancel_work_sync(&hdev->power_on)` was moved to hci_dev_close_sync in > commit [1] to ensure that power_on work is canceled after HCI interface > down. > > But, in certain cases power_on work function may call hci_dev_close_sync > itself: hci_power_on -> hci_dev_do_close -> hci_dev_close_sync -> > cancel_work_sync(&hdev->power_on), causing deadlock. In particular, this > happens when device is rfkilled on boot. To avoid deadlock, move > power_on work canceling out of hci_dev_do_close/hci_dev_close_sync. > > [...] Here is the summary with links: - Bluetooth: core: Fix deadlock due to `cancel_work_sync(&hdev->power_on)` from hci_power_on_sync. https://git.kernel.org/netdev/net/c/e36bea6e78ab You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html