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 <lionel.landwer...@openwide.fr> > Cc: Kirill A. Shutemov <kirill.shute...@linux.intel.com> > Cc: Riku Voipio <riku.voi...@iki.fi> > Cc: Aurelien Jarno <aurel...@aurel32.net> > Cc: Laurent Vivier <laur...@vivier.eu> > Signed-off-by: Max Filippov <jcmvb...@gmail.com> > --- > 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 <laur...@vivier.eu>