[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] semaphore syscalls - refresh
From: |
Thiemo Seufer |
Subject: |
Re: [Qemu-devel] [PATCH] semaphore syscalls - refresh |
Date: |
Sat, 31 Mar 2007 19:58:08 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Stuart Anderson wrote:
>
> This is a refresh of a prior patch to fix the semaphore system calls
> sem*() in user-linux mode. Some additional cases have been dealt with,
> and a small amount of code re-arrainging to prepare for the EFAULT patch.
> Tested using Linux Test Project in the target.
[snip]
> +static inline void target_to_host_semun(unsigned long cmd,
> + union semun *host_su,
> + target_ulong target_addr,
> + struct semid_ds *ds)
> +{
> + union target_semun *target_su;
> +
> + switch( cmd ) {
> + case GETALL:
> + case SETALL:
> + case IPC_STAT:
> + case IPC_SET:
> + lock_user_struct(target_su, target_addr, 1);
> + target_to_host_semid_ds(ds,target_su->buf);
> + host_su->buf = ds;
> + unlock_user_struct(target_su, target_addr, 0);
> + break;
I don't see how this can work with target_su being an uninitialized pointer.
Thiemo