Date: Fri, 15 Oct 2010 15:06:32 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/net if_tun.c Message-ID: <201010151506.o9FF6j2Q071695@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bz 2010-10-15 15:06:32 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/net if_tun.c Log: SVN rev 213895 on 2010-10-15 15:06:32Z by bz MFC r186391,186483,186497 (qingli, kmacy 21 months ago): r186391: Provide a condition variable to delay the cloned interface destroy operation until the referenced clone device has been closed by the process properly. The behavior is now consistently with the previous release. r186483: - Close a race during which the open flag could be cleared but the tun_softc would still be referenced by adding a separate TUN_CLOSED flag that is set after tunclose is done referencing it. - drop the tun_mtx after the flag check to avoid holding it across if_detach which can recurse in to if_tun.c r186497: The "tun?" dev need not be opened at all. One is allowed to perform the following operations, e.g.: 1) ifconfig tun0 create 2) ifconfig tun0 10.1.1.1 10.1.1.2 3) route add -net 192.103.54.0/24 -iface tun0 4) ifconfig tun0 destroy If cv wait on the TUN_CLOSED flag, then the last operation (4) will block forever. Revert the previous changes and fix the mtx_unlock() leak. PR: kern/116837 Submitted by: Mikolaj Golub (to.my.trociny gmail.com) (Not used the patch, just did the MFC) Revision Changes Path 1.163.2.5 +11 -2 src/sys/net/if_tun.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010151506.o9FF6j2Q071695>