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: <20190221152402.GB17102@codeaurora.org>
Date:   Thu, 21 Feb 2019 08:24:02 -0700
From:   Lina Iyer <ilina@...eaurora.org>
To:     "Raju P.L.S.S.S.N" <rplsssn@...eaurora.org>
Cc:     andy.gross@...aro.org, david.brown@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        rnayak@...eaurora.org, bjorn.andersson@...aro.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        sboyd@...nel.org, evgreen@...omium.org, dianders@...omium.org,
        mka@...omium.org, Maulik Shah <mkshah@...eaurora.org>
Subject: Re: [PATCH v1 2/2] drivers: soc: qcom: rpmh-rsc: Correct check for
 slot number

On Thu, Feb 21 2019 at 05:42 -0700, Raju P.L.S.S.S.N wrote:
>From: Maulik Shah <mkshah@...eaurora.org>
>
>The return index value from bitmap_find_next_zero_area can be higher
>than available slot. So correct the check to return error in such case.
>
>Signed-off-by: Maulik Shah <mkshah@...eaurora.org>
>Signed-off-by: Raju P.L.S.S.S.N <rplsssn@...eaurora.org>
Reviewed-by: Lina Iyer <ilina@...eaurora.org>
>---
> drivers/soc/qcom/rpmh-rsc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
>index 10b3102298c7..3ff3bebd4d71 100644
>--- a/drivers/soc/qcom/rpmh-rsc.c
>+++ b/drivers/soc/qcom/rpmh-rsc.c
>@@ -491,7 +491,7 @@ static int find_slots(struct tcs_group *tcs, const struct tcs_request *msg,
> 	do {
> 		slot = bitmap_find_next_zero_area(tcs->slots, MAX_TCS_SLOTS,
> 						  i, msg->num_cmds, 0);
>-		if (slot == tcs->num_tcs * tcs->ncpt)
>+		if (slot >= tcs->num_tcs * tcs->ncpt)
> 			return -ENOMEM;
> 		i += tcs->ncpt;
> 	} while (slot + msg->num_cmds - 1 >= i);
>--
>QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
>of the Code Aurora Forum, hosted by The Linux Foundation.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ