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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Jun 2022 11:27:32 -0700
From:   Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        linux-bluetooth@...r.kernel.org, marcel@...tmann.org
Subject: Re: [PATCH -next] Bluetooth: hci_core: Fix error return code in hci_register_dev()

On Mon, Jun 6, 2022 at 6:38 AM Yang Yingliang <yangyingliang@...wei.com> wrote:
>
> If hci_register_suspend_notifier() fails, it should return error
> code in hci_register_dev().
>
> Fixes: d6bb2a91f95b ("Bluetooth: Unregister suspend with userchannel")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
>  net/bluetooth/hci_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index a4b4b3b927f2..dbddf891a4a9 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -2646,7 +2646,8 @@ int hci_register_dev(struct hci_dev *hdev)
>         hci_sock_dev_event(hdev, HCI_DEV_REG);
>         hci_dev_hold(hdev);
>
> -       if (hci_register_suspend_notifier(hdev))
> +       error = hci_register_suspend_notifier(hdev);
> +       if (error)
>                 goto err_wqueue;
>
>         queue_work(hdev->req_workqueue, &hdev->power_on);
> --
> 2.25.1
>

Ah, I missed this. Good catch!

Acked-by: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ