From 6e5679fe599c53bf6a33e98d3c69b9012d0769cd Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 30 Mar 1995 17:33:14 +0000 Subject: (trivfs_S_io_restrict_auth): Lock CRED->po->cntl->lock around relevant code. --- libtrivfs/io-restrict-auth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libtrivfs/io-restrict-auth.c') 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++) -- cgit v1.2.3