-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. This was a major bug within dbus that was causing dbus to crash it was discussed at the time whether this is a dbus bug or an libselinux bug, it was decided that we should fix it within libselinux. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAk/JEfUACgkQrlYvE4MpobNG/QCVFieKpp8JMXD9tdK/73i3d1i/ 7ACeNooL9KhVL+c2ocxaFGJLXJ81Yr4= =PmSa -----END PGP SIGNATURE-----
>From cf925106d2e4ec94dfbd5cd72547157a200d5d8f Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Fri, 3 Feb 2012 10:22:26 -0500 Subject: [PATCH 17/90] libselinux: avc_netlink_recieve handle EINTR FIXME should continue to poll if it receinves an EINTR rather then exiting with an error. [hmmmm, is this an appplication bug? should they set O_NONBLOCK? I dunno] NOT-Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- libselinux/src/avc_internal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libselinux/src/avc_internal.c b/libselinux/src/avc_internal.c index be4c0a3..a07aa7f 100644 --- a/libselinux/src/avc_internal.c +++ b/libselinux/src/avc_internal.c @@ -101,7 +101,9 @@ static int avc_netlink_receive(char *buf, unsigned buflen, int blocking) socklen_t nladdrlen = sizeof nladdr; struct nlmsghdr *nlh = (struct nlmsghdr *)buf; - rc = poll(&pfd, 1, (blocking ? -1 : 0)); + do { + rc = poll(&pfd, 1, (blocking ? -1 : 0)); + } while (rc < 0 && errno == EINTR); if (rc == 0 && !blocking) { errno = EWOULDBLOCK; -- 1.7.10.2