Skip to content

intel_idle: Fix hot plug handling.

Richard Cochran linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10intel_idle: remove useless return from void function.drivers/idle/intel_idle.c+0 -20 replies
2/10intel_idle: Fix a helper function's return value.drivers/idle/intel_idle.c+1 -30 replies
3/10intel_idle: Remove redundant initialization calls.drivers/idle/intel_idle.c+0 -60 replies
4/10intel_idle: Fix deallocation order on the driver exit path.drivers/idle/intel_idle.c+3 -30 replies
5/10intel_idle: Fix dangling registration on error path.drivers/idle/intel_idle.c+5 -40 replies
6/10intel_idle: Avoid a double free of the per-CPU data.drivers/idle/intel_idle.c+3 -40 replies
7/10intel_idle: Setup the timer broadcast only on successful driver load.drivers/idle/intel_idle.c+8 -70 replies
8/10intel_idle: Don't overreact to a cpuidle registration failure.drivers/idle/intel_idle.c+1 -10 replies
9/10intel_idle: Propagate hot plug errors.drivers/idle/intel_idle.c+5 -20 replies
10/10intel_idle: Clean up all registered devices on exit.drivers/idle/intel_idle.c+8 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/10] intel_idle: Fix hot plug handling.

This driver has one serious and one mild bug in its hot plug handling.

First, whenever a new CPU goes on line, if the call to cpuidle_register_driver() should fail (say, due to lack of memory), then the driver frees its per-CPU region. On the *next* CPU_ONLINE event, the driver will happily use the region again and even free it again if the failure repeats.

Second, for each new on line CPU, a device is registered with the cpuidle layer. However, when a CPU goes down, its device is never unregistered, even if the module exits.

Although this driver may not (yet?) be a built as a module, still this patch series cleans up the exit path in order to make the resource allocations clear.

Richard Cochran (10):
intel_idle: remove useless return from void function.
intel_idle: Fix a helper function's return value.
intel_idle: Remove redundant initialization calls.
intel_idle: Fix deallocation order on the driver exit path.
intel_idle: Fix dangling registration on error path.
intel_idle: Avoid a double free of the per-CPU data.
intel_idle: Setup the timer broadcast only on successful driver load.
intel_idle: Don't overreact to a cpuidle registration failure.
intel_idle: Propagate hot plug errors.
intel_idle: Clean up all registered devices on exit.

 drivers/idle/intel_idle.c | 61 ++++++++++++++++++++++++-----------------------
 1 file changed, 31 insertions(+), 30 deletions(-)
Signature · 1 line
2.1.4