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: <1331891364.18960.221.camel@twins>
Date:	Fri, 16 Mar 2012 10:49:24 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	"Liu, Chuansheng" <chuansheng.liu@...el.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Yanmin Zhang <yanmin_zhang@...ux.intel.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>
Subject: RE: [PATCH] Fix the race between smp_call_function and CPU booting

On Fri, 2012-03-16 at 06:24 +0000, Liu, Chuansheng wrote:

> Based on your patch, I did a little modification, how do you think of that?

> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -640,8 +640,10 @@ void set_cpu_present(unsigned int cpu, bool present)
>  
>  void set_cpu_online(unsigned int cpu, bool online)
>  {
> -       if (online)
> +       if (online) {
>                 cpumask_set_cpu(cpu, to_cpumask(cpu_online_bits));
> +               cpumask_set_cpu(cpu, to_cpumask(cpu_active_bits));
> +       }
>         else
>                 cpumask_clear_cpu(cpu, to_cpumask(cpu_online_bits));
>  }

I'm thinking this lacks rationale. What was wrong, Why does this fix it.
If you can't answer that stop tinkering and start thinking.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ