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]
Date:   Mon, 24 Jun 2019 16:04:49 -0700
From:   "Paul E. McKenney" <paulmck@...ux.ibm.com>
To:     Muchun Song <smuchun@...il.com>
Cc:     joel@...lfernandes.org, tglx@...utronix.de, mingo@...nel.org,
        rostedt@...dmis.org, frederic@...nel.org,
        alexander.levin@...izon.com, peterz@...radead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] softirq: Replace this_cpu_write with __this_cpu_write if
 irq is disabled

On Tue, Jun 18, 2019 at 10:33:05PM +0800, Muchun Song wrote:
> Irq is disabled before this_cpu_write(), so we can Replace this_cpu_write()
> with __this_cpu_write().
> 
> Signed-off-by: Muchun Song <smuchun@...il.com>

This passes light rcutorture testing, and looks rather low risk.

Tested-by: Paul E. McKenney <paulmck@...ux.ibm.com>

> ---
>  kernel/softirq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 2c3382378d94..eaf3bdf7c749 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -650,7 +650,7 @@ static int takeover_tasklets(unsigned int cpu)
>  	/* Find end, append list for that CPU. */
>  	if (&per_cpu(tasklet_vec, cpu).head != per_cpu(tasklet_vec, cpu).tail) {
>  		*__this_cpu_read(tasklet_vec.tail) = per_cpu(tasklet_vec, cpu).head;
> -		this_cpu_write(tasklet_vec.tail, per_cpu(tasklet_vec, cpu).tail);
> +		__this_cpu_write(tasklet_vec.tail, per_cpu(tasklet_vec, cpu).tail);
>  		per_cpu(tasklet_vec, cpu).head = NULL;
>  		per_cpu(tasklet_vec, cpu).tail = &per_cpu(tasklet_vec, cpu).head;
>  	}
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ