X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=user-exec.c;h=d8c2ad9f2fdac97508afd026a0f136fdb01a4d03;hb=fa79c914efd35cb60e0bc18512c03690c48b13e2;hp=cd905ff18969b45901aef45260a430b875124e4b;hpb=aea6ff7fa07b046fb9f43d6262d6e34b77e8437e;p=mirror_qemu.git diff --git a/user-exec.c b/user-exec.c index cd905ff189..d8c2ad9f2f 100644 --- a/user-exec.c +++ b/user-exec.c @@ -82,7 +82,7 @@ void cpu_resume_from_signal(CPUArchState *env1, void *puc) the effective address of the memory exception. 'is_write' is 1 if a write caused the exception and otherwise 0'. 'old_set' is the signal set which should be restored */ -static inline int handle_cpu_signal(unsigned long pc, unsigned long address, +static inline int handle_cpu_signal(uintptr_t pc, unsigned long address, int is_write, sigset_t *old_set, void *puc) { @@ -97,7 +97,8 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address, pc, address, is_write, *(unsigned long *)old_set); #endif /* XXX: locking issue */ - if (is_write && page_unprotect(h2g(address), pc, puc)) { + if (is_write && h2g_valid(address) + && page_unprotect(h2g(address), pc, puc)) { return 1; }