lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <6CF07A82-966F-4DC2-B2B6-D0AB3DE354B5@holtmann.org>
Date:   Thu, 19 Aug 2021 17:24:57 +0200
From:   Marcel Holtmann <marcel@...tmann.org>
To:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc:     Johan Hedberg <johan.hedberg@...il.com>,
        Luiz Augusto von Dentz <luiz.dentz@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
        Kai-Heng Feng <kai.heng.feng@...onical.com>
Subject: Re: [PATCH] Revert "Bluetooth: Shutdown controller after workqueues
 are flushed or cancelled"

Hi Dmitry,

> This reverts commit 0ea9fd001a14ebc294f112b0361a4e601551d508. It moved
> calling shutdown callback after flushing the queues. In doing so it
> disabled calling the shutdown hook completely: shutdown condition
> tests for HCI_UP in hdev->flags, which gets cleared now before checking
> this condition (see test_and_clear_bit(HCI_UP, ...) call). Thus shutdown
> hook was never called.
> 
> This would not be a problem itself and could fixed with just removing
> the HCI_UP condition (since if we are this point, we already know that
> the HCI device was up before calling hci_dev_do_close(). However the
> fact that shutdown hook was not called hid the fact that it is not
> proper to call shutdown hook so late in the sequence. The hook would
> usually call __hci_cmd_sync()/__hci_cmd_sync_ev(), which would timeout
> without running queues.
> 
> Thus I think it is more proper at this moment to revert the commit and
> look for a better solution.
> 
> Fixes: 0ea9fd001a14 ("Bluetooth: Shutdown controller after workqueues are flushed or cancelled")
> Cc: Kai-Heng Feng <kai.heng.feng@...onical.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> ---
> net/bluetooth/hci_core.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)

I just merged this patch:

commit 0ea53674d07fb6db2dd7a7ec2fdc85a12eb246c2
Author: Kai-Heng Feng <kai.heng.feng@...onical.com>
Date:   Tue Aug 10 12:53:15 2021 +0800

    Bluetooth: Move shutdown callback before flushing tx and rx queue
    
    Commit 0ea9fd001a14 ("Bluetooth: Shutdown controller after workqueues
    are flushed or cancelled") introduced a regression that makes mtkbtsdio
    driver stops working:

Please check if this works for you.

Regards

Marcel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ