[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/traps: fix an off-by-one error
On 05.05.2020 16:01, Hongyan Xia wrote: > On Tue, 2020-05-05 at 15:38 +0200, Jan Beulich wrote: >> On 05.05.2020 13:06, Hongyan Xia wrote: >>> @@ -358,7 +359,7 @@ static void show_guest_stack(struct vcpu *v, >>> const struct cpu_user_regs *regs) >>> if ( mask == PAGE_SIZE ) >>> { >>> BUILD_BUG_ON(PAGE_SIZE == STACK_SIZE); >>> - unmap_domain_page(stack); >>> + unmap_domain_page(stack_page); >>> } >> >> With this I think you want to change the whole construct here to >> >> if ( stack_page ) >> unmap_domain_page(stack_page); >> >> i.e. with the then no longer relevant BUILD_BUG_ON() also dropped. > > I wonder if such a construct is better with UNMAP_DOMAIN_PAGE(), since > it deals with NULL and will nullify it to prevent misuse. In the case here I think I agree. For the future may I ask that you wait with sending a new version until the discussion on the previous one has settled? Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |