diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-03-30 17:33:14 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-03-30 17:33:14 +0000 |
commit | 6e5679fe599c53bf6a33e98d3c69b9012d0769cd (patch) | |
tree | 21ae87720f282417f36330d86fff3406a92cc9d1 /libtrivfs/io-restrict-auth.c | |
parent | e5355a620c885eac81404a39ae051d912ca54f77 (diff) |
(trivfs_S_io_restrict_auth): Lock CRED->po->cntl->lock around relevant
code.
Diffstat (limited to 'libtrivfs/io-restrict-auth.c')
-rw-r--r-- | libtrivfs/io-restrict-auth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libtrivfs/io-restrict-auth.c b/libtrivfs/io-restrict-auth.c index ac1faa7e..1d466f69 100644 --- a/libtrivfs/io-restrict-auth.c +++ b/libtrivfs/io-restrict-auth.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1993, 1994 Free Software Foundation + Copyright (C) 1993, 1994, 1995 Free Software Foundation This file is part of the GNU Hurd. @@ -62,8 +62,10 @@ trivfs_S_io_restrict_auth (struct trivfs_protid *cred, newcred = ports_allocate_port (sizeof (struct trivfs_protid), cred->pi.type); newcred->isroot = 0; + mutex_lock (&cred->po->cntl->lock); newcred->po = cred->po; newcred->po->refcnt++; + mutex_unlock (&cred->po->cntl->lock); if (cred->isroot) { for (i = 0; i < nuids; i++) |