From 1711ce4a9b0c09f2c139a422bd03f9dfd3a1023d Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 21 Feb 2004 20:08:33 +0000 Subject: fiddle with filedesc lock to prevent recursion. crash and fix confirmed by marc balmer --- sys/miscfs/portal/portal_vnops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/miscfs') diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c index de608b33825..7364180e291 100644 --- a/sys/miscfs/portal/portal_vnops.c +++ b/sys/miscfs/portal/portal_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portal_vnops.c,v 1.16 2003/09/23 16:51:13 millert Exp $ */ +/* $OpenBSD: portal_vnops.c,v 1.17 2004/02/21 20:08:32 tedu Exp $ */ /* $NetBSD: portal_vnops.c,v 1.17 1996/02/13 13:12:57 mycroft Exp $ */ /* @@ -407,8 +407,10 @@ portal_open(v) do { struct mbuf *m = 0; int flags = MSG_WAITALL; + fdpunlock(p->p_fd); error = soreceive(so, (struct mbuf **) 0, &auio, &m, &cm, &flags); + fdplock(p->p_fd, p); if (error) goto bad; -- cgit v1.2.3