linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] intel_idle: Fix hot plug handling.
@ 2016-03-29 13:15 Richard Cochran
  2016-03-29 13:15 ` [PATCH 01/10] intel_idle: remove useless return from void function Richard Cochran
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Richard Cochran @ 2016-03-29 13:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: rt

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(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-01  1:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 13:15 [PATCH 00/10] intel_idle: Fix hot plug handling Richard Cochran
2016-03-29 13:15 ` [PATCH 01/10] intel_idle: remove useless return from void function Richard Cochran
2016-03-29 13:15 ` [PATCH 02/10] intel_idle: Fix a helper function's return value Richard Cochran
2016-03-29 13:15 ` [PATCH 03/10] intel_idle: Remove redundant initialization calls Richard Cochran
2016-03-29 13:15 ` [PATCH 04/10] intel_idle: Fix deallocation order on the driver exit path Richard Cochran
2016-03-29 13:15 ` [PATCH 05/10] intel_idle: Fix dangling registration on error path Richard Cochran
2016-03-29 13:15 ` [PATCH 06/10] intel_idle: Avoid a double free of the per-CPU data Richard Cochran
2016-03-29 13:15 ` [PATCH 07/10] intel_idle: Setup the timer broadcast only on successful driver load Richard Cochran
2016-03-29 13:16 ` [PATCH 08/10] intel_idle: Don't overreact to a cpuidle registration failure Richard Cochran
2016-03-29 13:16 ` [PATCH 09/10] intel_idle: Propagate hot plug errors Richard Cochran
2016-03-29 13:16 ` [PATCH 10/10] intel_idle: Clean up all registered devices on exit Richard Cochran
2016-04-01  1:39   ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).