Re: [PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-03 Thread Silas Boyd-Wickizer
On Fri, Aug 03, 2012 at 03:56:40PM +0200, Jean Delvare wrote: > Hi Silas, > > On Thu, 2 Aug 2012 17:07:08 -0700, Silas Boyd-Wickizer wrote: > > via_cputemp_init in drivers/hwmon/via-cputemp.c loops with > > for_each_online_cpu, adding platform_devices, then calls > > register_hotcpu_notifier. If

Re: [PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-03 Thread Jean Delvare
Hi Silas, On Thu, 2 Aug 2012 17:07:08 -0700, Silas Boyd-Wickizer wrote: > via_cputemp_init in drivers/hwmon/via-cputemp.c loops with > for_each_online_cpu, adding platform_devices, then calls > register_hotcpu_notifier. If a CPU is offlined between the loop and > register_hotcpu_notifier, then

Re: [PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-03 Thread Harald Welte
Hi Silas, thanks a lot for the finding and addressing the issue. On Thu, Aug 02, 2012 at 05:07:08PM -0700, Silas Boyd-Wickizer wrote: > Signed-off-by: Silas Boyd-Wickizer Acked-by: Harald Welte -- - Harald Weltehttp://laforge.gnumonks.org/

Re: [PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-03 Thread Harald Welte
Hi Silas, thanks a lot for the finding and addressing the issue. On Thu, Aug 02, 2012 at 05:07:08PM -0700, Silas Boyd-Wickizer wrote: Signed-off-by: Silas Boyd-Wickizer s...@mit.edu Acked-by: Harald Welte lafo...@gnumonks.org -- - Harald Welte lafo...@gnumonks.org

Re: [PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-03 Thread Jean Delvare
Hi Silas, On Thu, 2 Aug 2012 17:07:08 -0700, Silas Boyd-Wickizer wrote: via_cputemp_init in drivers/hwmon/via-cputemp.c loops with for_each_online_cpu, adding platform_devices, then calls register_hotcpu_notifier. If a CPU is offlined between the loop and register_hotcpu_notifier, then later

Re: [PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-03 Thread Silas Boyd-Wickizer
On Fri, Aug 03, 2012 at 03:56:40PM +0200, Jean Delvare wrote: Hi Silas, On Thu, 2 Aug 2012 17:07:08 -0700, Silas Boyd-Wickizer wrote: via_cputemp_init in drivers/hwmon/via-cputemp.c loops with for_each_online_cpu, adding platform_devices, then calls register_hotcpu_notifier. If a CPU is

[PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-02 Thread Silas Boyd-Wickizer
via_cputemp_init in drivers/hwmon/via-cputemp.c loops with for_each_online_cpu, adding platform_devices, then calls register_hotcpu_notifier. If a CPU is offlined between the loop and register_hotcpu_notifier, then later onlined, via_cputemp_device_add will attempt to platform devices with the

[PATCH 3/3] Use get_online_cpus to avoid races involving for_each_online_cpu

2012-08-02 Thread Silas Boyd-Wickizer
via_cputemp_init in drivers/hwmon/via-cputemp.c loops with for_each_online_cpu, adding platform_devices, then calls register_hotcpu_notifier. If a CPU is offlined between the loop and register_hotcpu_notifier, then later onlined, via_cputemp_device_add will attempt to platform devices with the