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

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

 



On 15 June 2011 09:35, Alexander Graf <agraf@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux