diff options
author | Dexuan Cui <decui@microsoft.com> | 2017-03-04 18:14:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-16 16:42:00 +0900 |
commit | 5a16dfc855127906fcd2935fb039bc8989313915 (patch) | |
tree | 063ce01d12f60cb72a355c7bbcb2a17828b96d72 /drivers/hv/hv_util.c | |
parent | e9c18ae6eb2b312f16c63e34b43ea23926daa398 (diff) |
Drivers: hv: util: don't forget to init host_ts.lock
Without the patch, I always get a "BUG: spinlock bad magic" warning.
Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv_util.c')
-rw-r--r-- | drivers/hv/hv_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index 3042eaa13062..186b10083c55 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -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); /* |