Date: Sun, 2 Mar 2008 15:49:39 +0100 From: Paolo Pisati <piso@FreeBSD.org> To: freebsd-ipfw@FreeBSD.org Cc: freebsd-net@FreeBSD.org Subject: ipfw initialization: SI_ORDER_ANY -> SI_ORDER_MIDDLE? Message-ID: <20080302144939.GA23353@tin.it>
next in thread | raw e-mail | index | archive | help
Hi, i just found out that depending on a KLD doesn't imply any initialization order, thus depending on a lock initialized in the ipfw init path is _really_ a bad idea from another KLD init path (see ip_fw_nat.c::ipfw_nat_init()). A fix would be to move ipfw init priority from SI_ORDER_ANY to SI_ORDER_MIDDLE, but i guess there are side effects that i'm unaware in this modification... On the other hand, if we keep ipfw at SI_ORDER_ANY, i don't know how to build stuff that relies on it without opening race conditions: see ip_fw_nat.c::flush_nat_ptrs() called in rule deletion and rule configuration paths. bye, P. ps yes, next time i'll better read the MODULE_DEPEND man page...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080302144939.GA23353>