Missing lock acquire.

This commit is contained in:
ad 2008-01-05 23:54:24 +00:00
parent 58dc3540b0
commit e5942a85c1

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_info_43.c,v 1.30 2007/12/20 23:02:44 dsl Exp $ */
/* $NetBSD: kern_info_43.c,v 1.31 2008/01/05 23:54:24 ad Exp $ */
/*
* Copyright (c) 1982, 1986, 1991, 1993
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_info_43.c,v 1.30 2007/12/20 23:02:44 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_info_43.c,v 1.31 2008/01/05 23:54:24 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -62,7 +62,9 @@ compat_43_sys_getdtablesize(struct lwp *l, const void *v, register_t *retval)
{
struct proc *p = l->l_proc;
mutex_enter(&p->p_mutex);
*retval = min((int)p->p_rlimit[RLIMIT_NOFILE].rlim_cur, maxfiles);
mutex_exit(&p->p_mutex);
return (0);
}