Re: [PATCH 0/4 V2] Use get_online_cpus to avoid races involving CPUhotplug

From: Silas Boyd-Wickizer
Date: Tue Sep 04 2012 - 12:40:37 EST


Hi Rusty,

I used libsparse and kernel source annotations to check that code uses
for_each_online_cpu in contexts with hotplug disabled
(e.g. get_online_cpus(), preempt_disable, ..). I compiled with an x86
64-bit allyesconfig, so I missed other architecture specific usages.
The checker code isn't great and the results still require some manual
inspection for weeding out false positives, etc:

http://pdos.csail.mit.edu/~sbw/online-checker/

Silas

On Thu, Aug 30, 2012 at 06:02:11AM +0930, Rusty Russell wrote:
> Silas Boyd-Wickizer <sbw@xxxxxxx> writes:
>
> > Hello,
> >
> > This is the second version of the patches to fix races described in:
> >
> > https://groups.google.com/forum/?fromgroups#!topic/linux.kernel/iSUDr94Qehc
> >
> > The changes in this version are:
> >
> > * fix commit log typo;
> > * prevent a race in via_cputemp_exit;
> > * and a new patch that prevents races during init/exit in
> > drivers/hwmon/coretemp.c.
>
> Hi Silas,
>
> Good work! How did you find these?
>
> Cheers,
> Rusty.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/