Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2009 09:44:07 +0000 (UTC)
From:      Marko Zec <zec@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/net vnet.c
Message-ID:  <200908310944.n7V9iFGD058989@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
zec         2009-08-31 09:44:07 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_8)
    sys/net              vnet.c 
  Log:
  SVN rev 196690 on 2009-08-31 09:44:07Z by zec
  
  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)
  
  Revision  Changes    Path
  1.8.2.3   +26 -20    src/sys/net/vnet.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908310944.n7V9iFGD058989>