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


Reply via email to