Skip to contentSkip to conversation

Drivers: hv: util: don't forget to init host_ts.lock

PATCH In review [email protected] 2 participants 2 messages Feb 28, 2017 – Mar 5, 2017 Hyper-V/Azure core and drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Drivers: hv: util: don't forget to init host_ts.lock

From: Dexuan Cui <[email protected]>

Without the patch, I always get a "BUG: spinlock bad magic" warning.

Fixes 3716a49a81ba ("hv_utils: implement Hyper-V PTP source")
Cc Vitaly Kuznetsov <[email protected]>
Cc "K. Y. Srinivasan" <[email protected]>
Cc Haiyang Zhang <[email protected]>
Cc Stephen Hemminger <[email protected]>
---
 drivers/hv/hv_util.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hv/hv_util.c +2 -0
index 3042eaa..186b100 100644
@@ -590,6 +590,8 @@ static int hv_timesync_init(struct hv_util_service *srv)
 	if (!hyperv_cs)
 		return -ENODEV;
 
+	spin_lock_init(&host_ts.lock);
+
 	INIT_WORK(&wrk.work, hv_set_host_time);
 
 	/*
Signature · 1 line
1.7.1
#1 lore raw
Quoted 48 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Monday, February 27, 2017 5:26 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Stephen Hemminger <[email protected]>
Subject: [PATCH 1/1] Drivers: hv: util: don't forget to init host_ts.lock

This&nbsp;sender&nbsp;failed&nbsp;our&nbsp;fraud&nbsp;detection&nbs p;checks&nbsp;and&nbsp;may&nbsp;not&nbsp;be&nbsp;who&nbsp;they& nbsp;appear&nbsp;to&nbsp;be.&nbsp;Learn&nbsp;about&nbsp;<a href="http://aka.ms/LearnAboutSpoofing">spoofing</a>

From: Dexuan Cui <[email protected]>

Without the patch, I always get a "BUG: spinlock bad magic" warning.

Fixes 3716a49a81ba ("hv_utils: implement Hyper-V PTP source")
Cc Vitaly Kuznetsov <[email protected]>
Cc "K. Y. Srinivasan" <[email protected]>
Cc Haiyang Zhang <[email protected]>
Cc Stephen Hemminger <[email protected]>
---
 drivers/hv/hv_util.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hv/hv_util.c +2 -1
index 3042eaa..186b100 100644
@@ -590,6 +590,8 @@ static int hv_timesync_init(struct hv_util_service *srv)
        if (!hyperv_cs)
                return -ENODEV;
 
+       spin_lock_init(&host_ts.lock);
+
        INIT_WORK(&wrk.work, hv_set_host_time);
 
        /*
--
Quoted 1 line

1.7.1

Greg,

Please drop this patch; I am going to resend.

K. Y