qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/10] linux-user: remove unused variables


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 10/10] linux-user: remove unused variables
Date: Wed, 15 Jun 2011 17:51:48 +0100

On 15 June 2011 09:35, Alexander Graf <address@hidden> wrote:
>
> On 14.06.2011, at 19:36, Michael S. Tsirkin wrote:

>>     return 0;
>> @@ -7058,18 +7056,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_long 
>> arg1,
>>     case TARGET_NR_osf_sigprocmask:
>>         {
>>             abi_ulong mask;
>> -            int how = arg1;
>>             sigset_t set, oldset;
>>
>>             switch(arg1) {
>>             case TARGET_SIG_BLOCK:
>> -                how = SIG_BLOCK;
>>                 break;
>>             case TARGET_SIG_UNBLOCK:
>> -                how = SIG_UNBLOCK;
>>                 break;
>>             case TARGET_SIG_SETMASK:
>> -                how = SIG_SETMASK;
>
> why go through the effort of setting "how" and then not using it? I'm pretty 
> sure this is a bug as well. A few lines down is the following code:
>
>   sigprocmask(arg1, &set, &oldset);
>
> which in TARGET_NR_sigprocmask would be:
>
>  ret = get_errno(sigprocmask(how, &set, &oldset));
>
> So we end up sending guest masks to the host.

Yes, this change is wrong. We've had a better version of these
fixes posted to the list already by Juan:

http://patchwork.ozlabs.org/patch/98376/

at least some of which have already been reviewed.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]