Skip to contentSkip to conversation

Patch "watchdog: bcm281xx: Fix use of uninitialized spinlock." has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jul 3, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

watchdog: bcm281xx: Fix use of uninitialized spinlock.

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
watchdog-bcm281xx-fix-use-of-uninitialized-spinlock.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From fedf266f9955d9a019643cde199a2fd9a0259f6f Mon Sep 17 00:00:00 2001

From: Eric Anholt <[email protected]>
Date: Thu, 27 Apr 2017 18:02:32 -0700
Subject: watchdog: bcm281xx: Fix use of uninitialized spinlock.

From: Eric Anholt <[email protected]>

commit fedf266f9955d9a019643cde199a2fd9a0259f6f upstream.

The bcm_kona_wdt_set_resolution_reg() call takes the spinlock, so initialize it earlier. Fixes a warning at boot with lock debugging enabled.

---
 drivers/watchdog/bcm_kona_wdt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/watchdog/bcm_kona_wdt.c +2 -1
@@ -304,6 +304,8 @@ static int bcm_kona_wdt_probe(struct pla
 	if (!wdt)
 		return -ENOMEM;
 
+	spin_lock_init(&wdt->lock);
+
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	wdt->base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(wdt->base))
@@ -316,7 +318,6 @@ static int bcm_kona_wdt_probe(struct pla
 		return ret;
 	}
 
-	spin_lock_init(&wdt->lock);
 	platform_set_drvdata(pdev, wdt);
 	watchdog_set_drvdata(&bcm_kona_wdt_wdd, wdt);
 	bcm_kona_wdt_wdd.parent = &pdev->dev;

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/watchdog-bcm281xx-fix-use-of-uninitialized-spinlock.patch