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: <20190130095917.7uxdxrjvtaeydcol@pathway.suse.cz>
Date:   Wed, 30 Jan 2019 10:59:17 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     Zhang Rui <rui.zhang@...el.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] thermal/intel_powerclamp: fix __percpu declaration of
 worker_data

On Sat 2019-01-19 17:15:23, Luc Van Oostenryck wrote:
> This variable is declared as:
> 	static struct powerclamp_worker_data * __percpu worker_data;
> In other words, a percpu pointer to struct ...
> 
> But this variable not used like so but as a pointer to a percpu
> struct powerclamp_worker_data.
> 
> So fix the declaration as:
> 	static struct powerclamp_worker_data __percpu *worker_data;
> 
> This also quiets Sparse's warnings from __verify_pcpu_ptr(), like:
>   494:49: warning: incorrect type in initializer (different address spaces)
>   494:49:    expected void const [noderef] <asn:3> *__vpp_verify
>   494:49:    got struct powerclamp_worker_data *
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
> ---
>  drivers/thermal/intel/intel_powerclamp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
> index 7571f7c2e..c7cba20bd 100644
> --- a/drivers/thermal/intel/intel_powerclamp.c
> +++ b/drivers/thermal/intel/intel_powerclamp.c
> @@ -101,7 +101,7 @@ struct powerclamp_worker_data {
>  	bool clamping;
>  };
>  
> -static struct powerclamp_worker_data * __percpu worker_data;
> +static struct powerclamp_worker_data __percpu * worker_data;

Makes perfect sense. I wonder why I wrote it in the wrong order.

Reviewed-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ