Message ID | 592C3231020000780015D449@prv-mh.provo.novell.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 29/05/2017 13:37, Jan Beulich wrote: > hap_teardown() unconditionally releases the paging lock and is always > being called without the lock held: Lock acquire should then be > unconditional too. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Hi, On 05/29/2017 02:55 PM, Andrew Cooper wrote: > On 29/05/2017 13:37, Jan Beulich wrote: >> hap_teardown() unconditionally releases the paging lock and is always >> being called without the lock held: Lock acquire should then be >> unconditional too. >> >> Signed-off-by: Jan Beulich <jbeulich@suse.com> > > Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Assuming this goes through staging first: Release-acked-by: Julien Grall <julien.grall@arm.com> Cheers,
>>> On 31.05.17 at 11:03, <julien.grall@arm.com> wrote: > On 05/29/2017 02:55 PM, Andrew Cooper wrote: >> On 29/05/2017 13:37, Jan Beulich wrote: >>> hap_teardown() unconditionally releases the paging lock and is always >>> being called without the lock held: Lock acquire should then be >>> unconditional too. >>> >>> Signed-off-by: Jan Beulich <jbeulich@suse.com> >> >> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> > > Assuming this goes through staging first: Of course, but strictly speaking this still needs an ack from George before it can go in anywhere. Jan > Release-acked-by: Julien Grall <julien.grall@arm.com> > > Cheers, > > -- > Julien Grall
>>> On 29.05.17 at 14:37, <JBeulich@suse.com> wrote: > hap_teardown() unconditionally releases the paging lock and is always > being called without the lock held: Lock acquire should then be > unconditional too. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> > --- > While this is only a cosmetic change afaict I would still like to > explore whether to include this in 4.9. > > --- a/xen/arch/x86/mm/hap/hap.c > +++ b/xen/arch/x86/mm/hap/hap.c > @@ -576,8 +576,7 @@ void hap_teardown(struct domain *d, bool > ASSERT(d->is_dying); > ASSERT(d != current->domain); > > - if ( !paging_locked_by_me(d) ) > - paging_lock(d); /* Keep various asserts happy */ > + paging_lock(d); /* Keep various asserts happy */ > > if ( paging_mode_enabled(d) ) > {
--- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -576,8 +576,7 @@ void hap_teardown(struct domain *d, bool ASSERT(d->is_dying); ASSERT(d != current->domain); - if ( !paging_locked_by_me(d) ) - paging_lock(d); /* Keep various asserts happy */ + paging_lock(d); /* Keep various asserts happy */ if ( paging_mode_enabled(d) ) {