x86/vpt: fully init timers before putting onto list
authorJan Beulich <jbeulich@suse.com>
Thu, 15 Jul 2021 07:30:47 +0000 (09:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Jul 2021 07:30:47 +0000 (09:30 +0200)
commit3ae25fc2b03cc583754098aaf80773a6e51832da
tree1aee0f5cd0c4e4a994b04f6f9de79d448263babb
parent665024b4f40d5e18359afd72fc5cbd3a8cd3d0b0
x86/vpt: fully init timers before putting onto list

With pt_vcpu_lock() no longer acquiring the pt_migrate lock, parties
iterating the list and acting on the timers of the list entries will no
longer be kept from entering their loops by create_periodic_time()'s
holding of that lock. Therefore at least init_timer() needs calling
ahead of list insertion, but keep this and set_timer() together.

Fixes: 8113b02f0bf8 ("x86/vpt: do not take pt_migrate rwlock in some cases")
Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
master commit: 6d622f3a96bbd76ce8422c6e3805e6609417ec76
master date: 2021-06-15 15:14:20 +0200
xen/arch/x86/hvm/vpt.c