Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp379127pxb; Wed, 15 Sep 2021 04:20:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHBA45ImlfikdljL7kxsqdB45hfqOEEndKRb1tWuxaaTcuF0CIMh25ArZlv+BXG/G+rH52 X-Received: by 2002:a02:6405:: with SMTP id t5mr77893jac.136.1631704855204; Wed, 15 Sep 2021 04:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631704855; cv=none; d=google.com; s=arc-20160816; b=mumQgiTpS3Rp09mei/QU0U7GnxEp//d/1VWGeGZlpyPpmrYQw1fEvr7fDYbU0gBWxx NY6NYqzZbqaLdXDsbfyIrm5QVMHHLMoGkdBjv7d6Lkz0pg34r77yfgUV01FWDgIWVv4Q 6HB+56Uvrx83LcAS54B/o0q6hEK/3BDghoWaFRgi/hCJXOiyIje+fdYtRfrFTuMBgmw0 Xc2N6g2FZ9LRDECA49cFchGWB7QvI8yWQxoP9k18CZVLmqvq822qKxt8uVPqiLXcrUbV rOr/umi7I03ftSKyGa9P1x87mzQ4ysmMUjdX55oFv3ZmeSACJwZix5Vj0XusvFaYQDFI bHQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zXCbeVSraxhEn+WeAM6ilHhaZRDyOcEN9pFx2I1Uhts=; b=nJcJmZBDMeTzPQega4w9MKPPyyOtkVaWG078dSPNZ1CSUUoM6FkWCnJn//AL1yaGG4 1x715pUFa20OOJUSqixeJVwBsC/hUMH0nIlYhkWH12Yj57OK9BdvuS8MPEywVijHgZft 0RfH9pORK4KvLhSVK+c2Sl334hj53o4Wj0AJCByihDTGmDv5zHKb5eEftMGw6HzWhNYd eQPJ3D9+uzdijAngcO3moc/GHeGYqQcp0nyJzwnQIO3gaZp3TIHpFwFLmvyX81R9TrFC PFET31WwZmHptLpE8CmR+i3R1Vw4GYjlzQgbU+BxLlWOTb9qEnE9g5YYaTdVLA8SjC8g VPcA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q2si12739949jac.2.2021.09.15.04.20.43; Wed, 15 Sep 2021 04:20:55 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232634AbhIOLUE (ORCPT + 99 others); Wed, 15 Sep 2021 07:20:04 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:53250 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232540AbhIOLUE (ORCPT ); Wed, 15 Sep 2021 07:20:04 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 36C991C0B76; Wed, 15 Sep 2021 13:18:44 +0200 (CEST) Date: Wed, 15 Sep 2021 13:18:43 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Hsin-Yi Wang , Guenter Roeck , Kai-Heng Feng , Marcel Holtmann , Sasha Levin , Mattijs Korpershoek Subject: Re: [PATCH 5.10 157/236] Bluetooth: Move shutdown callback before flushing tx and rx queue Message-ID: <20210915111843.GA16198@duo.ucw.cz> References: <20210913131100.316353015@linuxfoundation.org> <20210913131105.720088593@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: <20210913131105.720088593@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > [ Upstream commit 0ea53674d07fb6db2dd7a7ec2fdc85a12eb246c2 ] Upstream commit is okay... > So move the shutdown callback before flushing TX/RX queue to resolve the > issue. =2E..but something went wrong in stable. This is not moving code, this is duplicating it: > --- a/net/bluetooth/hci_core.c > +++ b/net/bluetooth/hci_core.c > @@ -1726,6 +1726,14 @@ int hci_dev_do_close(struct hci_dev *hdev) > hci_request_cancel_all(hdev); > hci_req_sync_lock(hdev); > =20 > + if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) && > + !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) && > + test_bit(HCI_UP, &hdev->flags)) { > + /* Execute vendor specific shutdown routine */ > + if (hdev->shutdown) > + hdev->shutdown(hdev); > + } > + > if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { > cancel_delayed_work_sync(&hdev->cmd_timer); > hci_req_sync_unlock(hdev); And yes, we end up with 2 copies in 5.10. Best regards, Pavel -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYUHWkwAKCRAw5/Bqldv6 8pcHAJwMIKymx3gC/j1OMFbG/uKphOBu0gCfVkgEvY8X8lbln2FfmF7qbfALr4k= =TbG8 -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e--