On 15 June 2011 09:35, Alexander Graf <ag...@suse.de> 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