qemu-stable
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/3] linux-user: Fix accept4(SOCK_NONBLOCK) syscall


From: Michael Tokarev
Subject: Re: [PATCH v2 2/3] linux-user: Fix accept4(SOCK_NONBLOCK) syscall
Date: Sun, 9 Jul 2023 21:03:17 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

08.07.2023 08:42, Helge Deller wrote:
The Linux accept4() syscall allows two flags only: SOCK_NONBLOCK and
SOCK_CLOEXEC, and returns -EINVAL if any other bits have been set.

Change the qemu implementation accordingly, which means we can not use
the fcntl_flags_tbl[] translation table which allows too many other
values.

Beside the correction in behaviour, this actually fixes the accept4()
emulation for hppa, mips and alpha targets for which SOCK_NONBLOCK is
different than TARGET_SOCK_NONBLOCK (aka O_NONBLOCK).

The fix can be verified with the testcase of the debian lwt package,
which hangs forever in a read() syscall without this patch.

This smells like -stable material too.  Queued this one.

Thanks,

/mjt



reply via email to

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