Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Apr 2009 13:08:47 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/net if.c if_var.h
Message-ID:  <200904231308.n3ND8weG006847@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2009-04-23 13:08:47 UTC

  FreeBSD src repository

  Modified files:
    sys/net              if.c if_var.h 
  Log:
  SVN rev 191423 on 2009-04-23 13:08:47Z by rwatson
  
  Add ifunit_ref(), a version of ifunit(), that returns not just an
  interface pointer, but also a reference to it.
  
  Modify ifioctl() to use ifunit_ref(), holding the reference until
  all ioctls, etc, have completed.
  
  This closes a class of reader-writer races in which interfaces
  could be removed during long-running ioctls, leading to crashes.
  Many other consumers of ifunit() should now use ifunit_ref() to
  avoid similar races.
  
  MFC after:      3 weeks
  
  Revision  Changes    Path
  1.325     +28 -6     src/sys/net/if.c
  1.137     +1 -0      src/sys/net/if_var.h



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