Skip to contentSkip to conversation

request for 4.14-stable: 5b9e886a4af97574ca3ce1147f35545da0e7afc7

PATCH Sudip Mukherjee 2 participants 2 messages Jul 18, 2018 – Jul 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Greg,

This was missing in 4.14-stable. Please apply to your queue.

--
Regards
Sudip

Quoted 1 line

From 5f63649f0084b72d76d95ffafde45ad06bd84b49 Mon Sep 17 00:00:00 2001

From: Peter Zijlstra <[email protected]>
Date: Mon, 30 Apr 2018 12:00:11 +0200
Subject: [PATCH] clocksource: Initialize cs->wd_list

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.

---
 kernel/time/clocksource.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/time/clocksource.c +2 -0
index 03918a19cf2d..3b71d859ee38 100644
@@ -322,6 +322,8 @@ static void clocksource_enqueue_watchdog(struct clocksource *cs)
 {
 	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. */
Signature · 1 line
2.11.0
#1 lore raw
Quoted 3 lines · Sudip Mukherjee

Hi Greg,

This was missing in 4.14-stable. Please apply to your queue.

Now applied, thanks.

greg k-h