Skip to content

Commit

Permalink
Drivers: hv: util: don't forget to init host_ts.lock
Browse files Browse the repository at this point in the history
Without the patch, I always get a "BUG: spinlock bad magic" warning.

Fixes: 3716a49 ("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>
  • Loading branch information
Dexuan Cui authored and Greg Kroah-Hartman committed Mar 16, 2017
1 parent e9c18ae commit 5a16dfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/hv/hv_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit 5a16dfc

Please sign in to comment.