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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABBYNZLZ7tx6nm1=gzuShgrp5xV4_4AT4_Y=kvAg8zbWjTR5dQ@mail.gmail.com>
Date: Mon, 21 Apr 2025 15:19:00 -0400
From: Luiz Augusto von Dentz <luiz.dentz@...il.com>
To: Chris Lu <chris.lu@...iatek.com>
Cc: Marcel Holtmann <marcel@...tmann.org>, Johan Hedberg <johan.hedberg@...il.com>, 
	Sean Wang <sean.wang@...iatek.com>, Jiande Lu <jiande.lu@...iatek.com>, 
	Will Lee <will-cy.lee@...iatek.com>, SS Wu <ss.wu@...iatek.com>, 
	Steve Lee <steve.lee@...iatek.com>, linux-bluetooth <linux-bluetooth@...r.kernel.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	linux-mediatek <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v1 1/2] Bluetooth: btmtksdio: Check function enabled
 before doing close

Hi Chris,

On Mon, Apr 21, 2025 at 3:29 AM Chris Lu <chris.lu@...iatek.com> wrote:
>
> Check BTMTKSDIO_FUNC_ENABLED flag before doing close to prevent
> btmtksdio_close been called twice.
>
> Signed-off-by: Chris Lu <chris.lu@...iatek.com>

Please add Fixes tag.

> ---
>  drivers/bluetooth/btmtksdio.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
> index 566c136e83bf..3c66e3ee9834 100644
> --- a/drivers/bluetooth/btmtksdio.c
> +++ b/drivers/bluetooth/btmtksdio.c
> @@ -723,6 +723,10 @@ static int btmtksdio_close(struct hci_dev *hdev)
>  {
>         struct btmtksdio_dev *bdev = hci_get_drvdata(hdev);
>
> +       /* Skip btmtksdio_close if BTMTKSDIO_FUNC_ENABLED isn't set */
> +       if (!test_bit(BTMTKSDIO_FUNC_ENABLED, &bdev->tx_state))
> +               return 0;
> +
>         sdio_claim_host(bdev->func);
>
>         /* Disable interrupt */
> --
> 2.45.2
>


-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ