mbox series

[v2,0/2] linux-user: fix clock_nanosleep()

Message ID 20200722174612.2917566-1-laurent@vivier.eu (mailing list archive)
Headers show
Series linux-user: fix clock_nanosleep() | expand

Message

Laurent Vivier July 22, 2020, 5:46 p.m. UTC
Update the "remain" time only if errno is EINTR and flags is TIMER_ABSTIME.

The v2 restores the get_errno() as our safe_clock_nanosleep() uses
errno to return the error value (and not ret).

As we use errno, we don't need the special case for ppc here, the CRF
bit is correctly managed in cpu_loop.c if ret is -errno.

Laurent Vivier (2):
  linux-user: fix clock_nanosleep()
  linux-user,ppc: fix clock_nanosleep() for linux-user-ppc

 linux-user/syscall.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

Comments

Alex Bennée July 23, 2020, 1:17 p.m. UTC | #1
Laurent Vivier <laurent@vivier.eu> writes:

> Update the "remain" time only if errno is EINTR and flags is TIMER_ABSTIME.
>
> The v2 restores the get_errno() as our safe_clock_nanosleep() uses
> errno to return the error value (and not ret).
>
> As we use errno, we don't need the special case for ppc here, the CRF
> bit is correctly managed in cpu_loop.c if ret is -errno.
>
> Laurent Vivier (2):
>   linux-user: fix clock_nanosleep()
>   linux-user,ppc: fix clock_nanosleep() for linux-user-ppc
>
>  linux-user/syscall.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)

Queued to for-5.1/fixes-for-rc1-v3, thanks.