Index: qemu/linux-user/syscall.c ================================================================================ --- qemu/linux-user/syscall.c +++ qemu/linux-user/syscall.c @@ -1983,9 +1983,19 @@ switch (call) { case IPCOP_semop: - ret = get_errno(semop(first,(struct sembuf *)g2h(ptr), second)); + { + struct sembuf *target_sops; + int i; + lock_user_struct(VERIFY_READ, target_sops, ptr, 0); + for(i=0; i