Date: Wed, 9 Aug 2006 15:04:30 +0000 (UTC) From: Yar Tikhiy <yar@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/net if_vlan.c Message-ID: <200608091504.k79F4VkC063267@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
yar 2006-08-09 15:04:30 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/net if_vlan.c Log: Destroy the cloned interfaces before, not after, detaching from the cloner structure in the module unload handler. The cloner structure was likely to be destroyed on detachment, which led to panic later, when its destroyed mutex was locked or whatever. It was just another "use after free" case. Now it is theoretically possible to create a vlan interface in between the loop over the interfaces and the call to if_clone_detach(). We have to live with it in 6-STABLE. In CURRENT, the actions are serialized properly in if_clone_detach(): remove cloner from the global list, destroy the cloned interfaces on it, detach from the cloner. This fix doesn't apply to HEAD, in which all the work is done by if_clone_detach(), so it goes immediately to RELENG_6. Revision Changes Path 1.79.2.11 +3 -3 src/sys/net/if_vlan.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608091504.k79F4VkC063267>