Date: Fri, 28 Aug 2009 22:30:55 +0000 (UTC) From: Marko Zec <zec@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/net vnet.c Message-ID: <200908282231.n7SMVBY3088053@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
zec 2009-08-28 22:30:55 UTC
FreeBSD src repository
Modified files:
sys/net vnet.c
Log:
SVN rev 196633 on 2009-08-28 22:30:55Z by zec
Introduce a separate sx lock for protecting lists of vnet sysinit
and sysuninit handlers.
Previously, sx_vnet, which is a lock designated for protecting
the vnet list, was (ab)used for protecting vnet sysinit / sysuninit
handler lists as well. Holding exclusively the sx_vnet lock while
invoking sysinit and / or sysuninit handlers turned out to be
problematic, since some of the handlers may attempt to wake up
another thread and wait for it to walk over the vnet list, hence
acquire a shared lock on sx_vnet, which in turn leads to a deadlock.
Protecting vnet sysinit / sysuninit lists with a separate lock
mitigates this issue, which was first observed with
flowtable_flush() / flowtable_cleaner() in sys/net/flowtable.c.
Reviewed by: rwatson, jhb
MFC after: 3 days
Revision Changes Path
1.10 +26 -20 src/sys/net/vnet.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908282231.n7SMVBY3088053>
