lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Aug 2017 14:27:27 +0200
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     Olaf Hering <olaf@...fle.de>
Cc:     "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        devel@...uxdriverproject.org (open list:Hyper-V CORE AND DRIVERS),
        linux-kernel@...r.kernel.org (open list)
Subject: Re: [PATCH] tools: hv: handle EINTR in hv_fcopy_daemon

Olaf Hering <olaf@...fle.de> writes:

> If strace attaches to the daemon pread returns with EINTR, and the
> process exits. Catch this case and continue with the next iteration.
>
> Signed-off-by: Olaf Hering <olaf@...fle.de>
> ---
>  tools/hv/hv_fcopy_daemon.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
> index c273dd34d144..574e6bf5865c 100644
> --- a/tools/hv/hv_fcopy_daemon.c
> +++ b/tools/hv/hv_fcopy_daemon.c
> @@ -201,6 +201,8 @@ int main(int argc, char *argv[])
>  		ssize_t len;
>  		len = pread(fcopy_fd, &buffer, sizeof(buffer), 0);
>  		if (len < 0) {
> +			if (errno == EINTR)
> +				continue;
>  			syslog(LOG_ERR, "pread failed: %s", strerror(errno));
>  			exit(EXIT_FAILURE);
>  		}

Shall we request SA_RESTART with sigaction() in all three daemons instead?

-- 
  Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ