Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411576
| From | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] sched, cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE |
| Date | 2016-06-01 23:50 +0200 |
| Message-ID | <rFmbx-5DL-75@gated-at.bofh.it> (permalink) |
| References | <rFiAW-3aE-25@gated-at.bofh.it> <rFkMp-4JV-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jun 01, 2016 at 10:20:03PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, June 01, 2016 06:52:16 PM Catalin Marinas wrote:
> > The cpuidle_devices per-CPU variable is only defined when CPU_IDLE is
> > enabled. Commit c8cc7d4de7a4 ("sched/idle: Reorganize the idle loop")
> > removed the #ifdef CONFIG_CPU_IDLE around cpuidle_idle_call() with the
> > compiler optimising away __this_cpu_read(cpuidle_devices). However, with
> > CONFIG_UBSAN && !CONFIG_CPU_IDLE, this optimisation no longer happens
> > and the kernel fails to link since cpuidle_devices is not defined.
> >
> > This patch introduces an accessor function for the current CPU cpuidle
> > device (returning NULL when !CONFIG_CPU_IDLE) and uses it in
> > cpuidle_idle_call().
> >
> > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
>
> OK
>
> Is this needed in -stable?
Not sure how common this config combination is (I was just testing
different options and came across it). Even though it's not a fix for
UBSAN, we could add it up to 4.5 since that's when UBSAN was merged:
Cc: <stable@vger.kernel.org> # 4.5+
--
Catalin
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] sched, cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE Catalin Marinas <catalin.marinas@arm.com> - 2016-06-01 20:00 +0200
Re: [PATCH] sched, cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-01 22:20 +0200
Re: [PATCH] sched, cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE Catalin Marinas <catalin.marinas@arm.com> - 2016-06-01 23:50 +0200
csiph-web