[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] x86/mem_sharing: silence ubsan warning
Running Xen compiled with UBSAN produces a warning for mismatched size. It's benign but this patch silences the warning. Signed-off-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx> --- xen/arch/x86/mm/mem_sharing.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index c428fd16ce..6920077dbf 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -1638,7 +1638,10 @@ static int fork_hap_allocation(struct domain *cd, struct domain *d) rc = hap_set_allocation(cd, mb << (20 - PAGE_SHIFT), &preempted); paging_unlock(cd); - return preempted ? -ERESTART : rc; + if ( preempted ) + rc = -ERESTART; + + return rc; } static void copy_tsc(struct domain *cd, struct domain *d) -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |