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]
Message-Id: <1498F44F-02AE-4384-9227-0BABE3F4764E@holtmann.org>
Date:   Wed, 28 Feb 2018 07:25:18 +0100
From:   Marcel Holtmann <marcel@...tmann.org>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     Johan Hedberg <johan.hedberg@...il.com>,
        Andy Gross <andy.gross@...aro.org>,
        David Brown <david.brown@...aro.org>,
        Bluez mailing list <linux-bluetooth@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH] Bluetooth: btqcomsmd: Fix channel open check

Hi Bjorn,

> rpmsg_create_ept() returns NULL on error and as such
> qcom_wcnss_open_channel() does the same. Clarify this in the
> kernel-doc and correct the error checks in btqcomsmd.
> 
> Fixes: 1511cc750c3d ("Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver")
> Cc: stable@...r.kernel.org
> Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> ---
> drivers/bluetooth/btqcomsmd.c | 8 ++++----
> drivers/soc/qcom/wcnss_ctrl.c | 2 ++
> 2 files changed, 6 insertions(+), 4 deletions(-)

I think you better split this into two separate patches so they can go via its subsystems independently.

> 
> diff --git a/drivers/bluetooth/btqcomsmd.c b/drivers/bluetooth/btqcomsmd.c
> index 2c9a5fc9137d..24f702927875 100644
> --- a/drivers/bluetooth/btqcomsmd.c
> +++ b/drivers/bluetooth/btqcomsmd.c
> @@ -151,13 +151,13 @@ static int btqcomsmd_probe(struct platform_device *pdev)
> 
> 	btq->acl_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_ACL",
> 						   btqcomsmd_acl_callback, btq);
> -	if (IS_ERR(btq->acl_channel))
> -		return PTR_ERR(btq->acl_channel);
> +	if (!btq->acl_channel)
> +		return -ENOENT;
> 
> 	btq->cmd_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_CMD",
> 						   btqcomsmd_cmd_callback, btq);
> -	if (IS_ERR(btq->cmd_channel))
> -		return PTR_ERR(btq->cmd_channel);
> +	if (!btq->cmd_channel)
> +		return -ENOENT;

Any reason not to fix qcom_wcnss_open_channel to use PTR_ERR?

Regards

Marcel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ