> -----Original Message----- > From: Roger Pau Monne <roger....@citrix.com> > Sent: 21 August 2019 09:52 > To: Paul Durrant <paul.durr...@citrix.com> > Cc: xen-devel@lists.xenproject.org; Jan Beulich <jbeul...@suse.com>; Andrew > Cooper > <andrew.coop...@citrix.com>; Wei Liu <w...@xen.org> > Subject: Re: [PATCH] viridian: make viridian_time_domain_freeze() safe to > call... > > On Wed, Aug 21, 2019 at 09:22:58AM +0100, Paul Durrant wrote: > > ...on a partially destroyed domain. > > > > viridian_time_domain_freeze() and viridian_time_vcpu_freeze() rely > > (respectively) on the dynamically allocated per-domain and per-vcpu viridian > > areas [1], which are freed during domain_relinquish_resources(). > > Because arch_domain_pause() can call viridian_domain_time_freeze() this > > can lead to host crashes if e.g. a XEN_DOMCTL_pausedomain is issued after > > domain_relinquish_resources() has run. > > > > To prevent such crashes, this patch adds a check of is_dying into > > viridian_time_domain_freeze(), and viridian_time_domain_thaw() which is > > similarly vulnerable to indirection into freed memory. > > > > NOTE: The patch also makes viridian_time_vcpu_freeze/thaw() static, since > > they have no callers outside of the same source module. > > > > [1] See commit e7a9b5e72f26 "viridian: separately allocate domain and vcpu > > structures". > > > > Signed-off-by: Paul Durrant <paul.durr...@citrix.com> > > Reviewed-by: Roger Pau Monné <roger....@citrix.com> > > Note you could also drop the viridian_ prefix to the now static > functions. >
Yeah, they could be dropped. May be a friendly committer could do it? :-) Paul _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel