Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clocksource: Initialize cs->wd_list

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) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Diego Viola <diego.viola@gmail.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: stable@vger.kernel.org
Cc: len.brown@intel.com
Cc: rjw@rjwysocki.net
Cc: rui.zhang@intel.com
Link: https://lkml.kernel.org/r/20180430100344.472662715@infradead.org

authored by

Peter Zijlstra and committed by
Thomas Gleixner
5b9e886a 2aae7bcf

+2
+2
kernel/time/clocksource.c
··· 332 332 333 333 static void clocksource_enqueue_watchdog(struct clocksource *cs) 334 334 { 335 + INIT_LIST_HEAD(&cs->wd_list); 336 + 335 337 if (cs->flags & CLOCK_SOURCE_MUST_VERIFY) { 336 338 /* cs is a clocksource to be watched. */ 337 339 list_add(&cs->wd_list, &watchdog_list);