Pull up following revision(s) (requested by riastradh in ticket #1681):
sys/arch/xen/x86/hypervisor_machdep.c: revision 1.46 (patch) xen/x86: Need kpreempt_disable/enable around curcpu() access. This is called with `hardware' interrupts enabled (between sti and cli), so presumably preemption is possible here.
This commit is contained in:
parent
17b8a48b33
commit
0924c9f419
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hypervisor_machdep.c,v 1.36 2019/05/09 17:09:51 bouyer Exp $ */
|
||||
/* $NetBSD: hypervisor_machdep.c,v 1.36.2.1 2023/07/31 15:39:23 martin Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.36 2019/05/09 17:09:51 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.36.2.1 2023/07/31 15:39:23 martin Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -168,6 +168,8 @@ stipending(void)
|
|||
volatile struct vcpu_info *vci;
|
||||
int ret;
|
||||
|
||||
kpreempt_disable();
|
||||
|
||||
ret = 0;
|
||||
ci = curcpu();
|
||||
vci = ci->ci_vcpu;
|
||||
|
@ -211,6 +213,8 @@ stipending(void)
|
|||
ci->ci_xpending);
|
||||
#endif
|
||||
|
||||
kpreempt_enable();
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue