]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r196633:
authorzec <zec@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 31 Aug 2009 09:44:07 +0000 (09:44 +0000)
committerzec <zec@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 31 Aug 2009 09:44:07 +0000 (09:44 +0000)
commit2afe4e3dfa1762f83d959228c1d7e48e40e33b94
tree63056f0859cf7260de6032cef41c2c222e5d926a
parent3969a4a10a2e8acddadf95b347d0976e8906e33e
MFC r196633:

  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

Approved by: re (rwatson)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196690 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/net/vnet.c