Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix a simple_lock() mismatch in unp_internalize().
details: https://anonhg.NetBSD.org/src/rev/a0de6b8655e4
branches: trunk
changeset: 543441:a0de6b8655e4
user: pk <pk%NetBSD.org@localhost>
date: Tue Feb 25 09:56:15 2003 +0000
description:
Fix a simple_lock() mismatch in unp_internalize().
We may need to merge the passes over the files contained in the message
as noted by enami tsugutomo on tech-smp.
diffstat:
sys/kern/uipc_usrreq.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 9ac9531500c0 -r a0de6b8655e4 sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c Tue Feb 25 09:12:11 2003 +0000
+++ b/sys/kern/uipc_usrreq.c Tue Feb 25 09:56:15 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_usrreq.c,v 1.57 2003/02/23 14:37:34 pk Exp $ */
+/* $NetBSD: uipc_usrreq.c,v 1.58 2003/02/25 09:56:15 pk Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.57 2003/02/23 14:37:34 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.58 2003/02/25 09:56:15 pk Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -935,8 +935,9 @@
fdp = (int *)CMSG_DATA(cm);
for (i = 0; i < nfds; i++) {
fd = *fdp++;
- if (fd_getfile(fdescp, fd) == NULL)
+ if ((fp = fd_getfile(fdescp, fd)) == NULL)
return (EBADF);
+ simple_unlock(&fp->f_slock);
}
/* Make sure we have room for the struct file pointers */
Home |
Main Index |
Thread Index |
Old Index