qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] linux-user: fix mq_getsetattr implementation


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v3] linux-user: fix mq_getsetattr implementation
Date: Sat, 31 Mar 2018 19:36:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Le 31/03/2018 à 19:16, Max Filippov a écrit :
> mq_getsetattr implementation does not set errno correctly in case of
> error. Also in the presence of both 2nd and 3rd arguments it calls both
> mq_getattr and mq_setattr, whereas only the latter call would suffice.
> 
> Don't call mq_getattr in the presence of the 2nd argument. Don't copy
> output back to user in case of error. Use get_errno to set errno value.
> 
> This fixes test rt/tst-mqueue2 from the glibc testsuite.
> 
> Cc: Lionel Landwerlin <address@hidden>
> Cc: Kirill A. Shutemov <address@hidden>
> Cc: Riku Voipio <address@hidden>
> Cc: Aurelien Jarno <address@hidden>
> Cc: Laurent Vivier <address@hidden>
> Signed-off-by: Max Filippov <address@hidden>
> ---
> Changes v2->v3:
> - don't defer get_errno call;
> 
> Changes v1->v2:
> - don't copy output back to user in case of error;
> - fix changelog.
> 
>  linux-user/syscall.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 

Reviewed-by: Laurent Vivier <address@hidden>



reply via email to

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