From dba32900ae70bc83279946097d2c8574719bf5dc Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 18 May 2008 02:40:41 +0000 Subject: [PATCH] KNOTE still needs mplock, so tapifstart() could be called in MPSAFE theads. --- sys/net/tap/if_tap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/tap/if_tap.c b/sys/net/tap/if_tap.c index c2be28be4d..f1e6a2a4bb 100644 --- a/sys/net/tap/if_tap.c +++ b/sys/net/tap/if_tap.c @@ -32,7 +32,7 @@ /* * $FreeBSD: src/sys/net/if_tap.c,v 1.3.2.3 2002/04/14 21:41:48 luigi Exp $ - * $DragonFly: src/sys/net/tap/if_tap.c,v 1.38 2007/12/31 04:58:53 sephe Exp $ + * $DragonFly: src/sys/net/tap/if_tap.c,v 1.39 2008/05/18 02:40:41 sephe Exp $ * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $ */ @@ -482,7 +482,10 @@ tapifstart(struct ifnet *ifp) tp->tap_flags &= ~TAP_RWAIT; wakeup((caddr_t)tp); } + + get_mplock(); KNOTE(&tp->tap_rsel.si_note, 0); + rel_mplock(); if ((tp->tap_flags & TAP_ASYNC) && (tp->tap_sigio != NULL)) { get_mplock(); -- 2.11.4.GIT