Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1746922imw; Tue, 5 Jul 2022 14:53:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sCGkdBN+dCXZs28NV6ppifLt7GlqMAaCdmQqj9W3fZV9cvGAjSXgrDPMJZoa+p+yTiF63b X-Received: by 2002:a05:6402:3893:b0:43a:2640:b7a0 with SMTP id fd19-20020a056402389300b0043a2640b7a0mr21036427edb.170.1657058037218; Tue, 05 Jul 2022 14:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657058037; cv=none; d=google.com; s=arc-20160816; b=EADsKtPKQZ+1XlcucJgJBQt+z0Q9e88CG6yYrj9qX/6yf6IAwF8rvcGi4c+Bc1Y6B+ kaI6dnfbFdSBlgvpVFamCdbXXeHCF7dtL+6firraLrWERNZs95aGKdG/dOD6AV6ZMe9Z mgbuMqxum/2Vap0xhJnwqDDs90iE4vKhy3sAbH+cUUfoRGPqzzmT1HIJa5HTDwASrUOW 2HaIb/7SHozAfw+yH3uaXVnPXfsR/CXZlxxznYVD9jDdPxicxAyuZRTHqqPcqVI6c2i9 0RX+VQpSdHW8ghLPo+F7fCG4CXBjQ4a3eqKEA731dcHTLqCyoS/AtL+zQJcpBUJ0tpQz hDBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=wnxQqiE4V7eyRaUhoORRjc2Gi38KAvkUomsjKgMbVKQ=; b=xanpiRKs65iTPjenyj+Nk/BriUhoo/OiQNdgv5kY+2/qYwWvxw0VGvOTT3D5KGP5qi xW3Tgpt2Qwxfm2UjHXsM1SA5crwPEQoJX0bhkl7PiWYzkz5N+pAqBrqr6cWwqIp0VPWi qPcOPtGa3sRlgQydzWhnuszZSDr1YBBL/8sDnObky/Rs6aJZYJOxQdNMn4JCzBSM7CNJ tFjgLaDjaSLXinYPcaifgBKd64LoiayLWDj3QE4CF2F+MSGf+/00G4jDKTpMEj2d812P EA+mEbdiKKfWdizawGUnYtu6Z7ZfKw4Pu0kg3qv7rDEVLdtcgO3xhcsb+uuQyt+miFUN hsCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LFDWrrej; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj4-20020a1709069c8400b006ff11ed7162si19629486ejc.535.2022.07.05.14.53.05; Tue, 05 Jul 2022 14:53:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LFDWrrej; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231313AbiGEVuR (ORCPT + 99 others); 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 X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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