3.16.60-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Peter Zijlstra <pet...@infradead.org>

commit 5b9e886a4af97574ca3ce1147f35545da0e7afc7 upstream.

A number of places relies on list_empty(&cs->wd_list), however the
list_head does not get initialized. Do so upon registration, such that
thereafter it is possible to rely on list_empty() correctly reflecting
the list membership status.

Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org>
Signed-off-by: Thomas Gleixner <t...@linutronix.de>
Tested-by: Diego Viola <diego.vi...@gmail.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com>
Cc: len.br...@intel.com
Cc: r...@rjwysocki.net
Cc: rui.zh...@intel.com
Link: https://lkml.kernel.org/r/20180430100344.472662...@infradead.org
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
 kernel/time/clocksource.c | 2 ++
 1 file changed, 2 insertions(+)

--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -385,6 +385,8 @@ static void clocksource_enqueue_watchdog
 {
        unsigned long flags;
 
+       INIT_LIST_HEAD(&cs->wd_list);
+
        spin_lock_irqsave(&watchdog_lock, flags);
        if (cs->flags & CLOCK_SOURCE_MUST_VERIFY) {
                /* cs is a clocksource to be watched. */

Reply via email to