[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 21/23: Make netfs_S_io_reauthenticate handle allocation errors
From: |
Samuel Thibault |
Subject: |
[hurd] 21/23: Make netfs_S_io_reauthenticate handle allocation errors |
Date: |
Tue, 13 Oct 2015 00:09:56 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 1fa0cec1b643483918933b5d6a419e77d6e16c6d
Author: Samuel Thibault <address@hidden>
Date: Sun Oct 11 22:14:18 2015 +0200
Make netfs_S_io_reauthenticate handle allocation errors
* libnetfs/io-reauthenticate.c (netfs_S_io_reauthenticate): Loop when
netfs_make_protid fails with EINTR, return error when it fails otherwise.
---
libnetfs/io-reauthenticate.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/libnetfs/io-reauthenticate.c b/libnetfs/io-reauthenticate.c
index 9192813..8ff4182 100644
--- a/libnetfs/io-reauthenticate.c
+++ b/libnetfs/io-reauthenticate.c
@@ -31,8 +31,18 @@ netfs_S_io_reauthenticate (struct protid *user, mach_port_t
rend_port)
if (!user)
return EOPNOTSUPP;
+ /* This routine must carefully ignore EINTR because we
+ are a simpleroutine, so callers won't know to restart. */
+
pthread_mutex_lock (&user->po->np->lock);
- newpi = netfs_make_protid (user->po, 0);
+ do
+ newpi = netfs_make_protid (user->po, 0);
+ while (! newpi && errno == EINTR);
+ if (! newpi)
+ {
+ pthread_mutex_unlock (&user->po->np->lock);
+ return errno;
+ }
newright = ports_get_send_right (newpi);
assert (newright != MACH_PORT_NULL);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (3f883d3 -> b989189), Samuel Thibault, 2015/10/12
- [hurd] 18/23: Update NEWS file, Samuel Thibault, 2015/10/12
- [hurd] 15/23: libtrivfs: deprecate old api, Samuel Thibault, 2015/10/12
- [hurd] 19/23: Add missing null checks in libshouldbeinlibc, Samuel Thibault, 2015/10/12
- [hurd] 21/23: Make netfs_S_io_reauthenticate handle allocation errors,
Samuel Thibault <=
- [hurd] 20/23: Drop duplicate port deallocation, Samuel Thibault, 2015/10/12
- [hurd] 14/23: libtrivfs: optimize the object lookup code, Samuel Thibault, 2015/10/12
- [hurd] 23/23: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2015/10/12
- [hurd] 10/23: trans/magic: convert to trivfs dynamic classes and buckets, Samuel Thibault, 2015/10/12
- [hurd] 04/23: libdiskfs: fflush stdout when pausing, Samuel Thibault, 2015/10/12
- [hurd] 11/23: trans/new-fifo: convert to trivfs dynamic classes and buckets, Samuel Thibault, 2015/10/12
- [hurd] 07/23: pflocal: convert to trivfs dynamic classes and buckets, Samuel Thibault, 2015/10/12
- [hurd] 09/23: trans/ifsock: convert to trivfs dynamic classes and buckets, Samuel Thibault, 2015/10/12
- [hurd] 12/23: trans/passwd: convert to trivfs dynamic classes and buckets, Samuel Thibault, 2015/10/12
- [hurd] 13/23: trans/proxy-defpager: convert to trivfs dynamic classes and buckets, Samuel Thibault, 2015/10/15