From d1e340364b9883eebdfb4928891b438172fe13fb Mon Sep 17 00:00:00 2001 From: alfred Date: Mon, 6 May 2002 19:31:28 +0000 Subject: Make funsetown() take a 'struct sigio **' so that the locking can be done internally. Ensure that no one can fsetown() to a dying process/pgrp. We need to check the process for P_WEXIT to see if it's exiting. Process groups are already safe because there is no such thing as a pgrp zombie, therefore the proctree lock completely protects the pgrp from having sigio structures associated with it after it runs funsetownlst. Add sigio lock to witness list under proctree and allproc, but over proc and pgrp. Seigo Tanimura helped with this. --- sys/net/if_tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/net/if_tun.c') diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index a6c89fb..18435fd 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -335,7 +335,7 @@ tunclose(dev_t dev, int foo, int bar, struct thread *td) splx(s); } - funsetown(tp->tun_sigio); + funsetown(&tp->tun_sigio); selwakeup(&tp->tun_rsel); TUNDEBUG ("%s%d: closed\n", ifp->if_name, ifp->if_unit); -- cgit v1.1