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: <20191018164901.GC1669@tuxbook-pro>
Date:   Fri, 18 Oct 2019 09:49:01 -0700
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Georgi Djakov <georgi.djakov@...aro.org>
Cc:     linux-pm@...r.kernel.org, evgreen@...omium.org,
        daidavid1@...eaurora.org, vincent.guittot@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] interconnect: Add locking in icc_set_tag()

On Fri 18 Oct 07:17 PDT 2019, Georgi Djakov wrote:

> We must ensure that the tag is not changed while we aggregate the
> requests. Currently the icc_set_tag() is not using any locks and this
> may cause the values to be aggregated incorrectly. Fix this by acquiring
> the icc_lock while we set the tag.
> 
> Fixes: 127ab2cc5f19 ("interconnect: Add support for path tags")
> Signed-off-by: Georgi Djakov <georgi.djakov@...aro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>

> ---
>  drivers/interconnect/core.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
> index e24092558c29..4940c0741d40 100644
> --- a/drivers/interconnect/core.c
> +++ b/drivers/interconnect/core.c
> @@ -408,8 +408,12 @@ void icc_set_tag(struct icc_path *path, u32 tag)
>  	if (!path)
>  		return;
>  
> +	mutex_lock(&icc_lock);
> +
>  	for (i = 0; i < path->num_nodes; i++)
>  		path->reqs[i].tag = tag;
> +
> +	mutex_unlock(&icc_lock);
>  }
>  EXPORT_SYMBOL_GPL(icc_set_tag);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ