Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2004 20:59:48 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/netinet6 in6_pcb.c
Message-ID:  <200406122059.i5CKxmX0001539@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2004-06-12 20:59:48 UTC

  FreeBSD src repository

  Modified files:
    sys/netinet6         in6_pcb.c 
  Log:
  Missed directory in previous commit; need to hold SOCK_LOCK(so)
  before calling sotryfree().
  
  -- Body of earlier bulk commit this belonged with --
  
    Log:
    Extend coverage of SOCK_LOCK(so) to include so_count, the socket
    reference count:
  
    - Assert SOCK_LOCK(so) macros that directly manipulate so_count:
      soref(), sorele().
  
    - Assert SOCK_LOCK(so) in macros/functions that rely on the state of
      so_count: sofree(), sotryfree().
  
    - Acquire SOCK_LOCK(so) before calling these functions or macros in
      various contexts in the stack, both at the socket and protocol
      layers.
  
    - In some cases, perform soisdisconnected() before sotryfree(), as
      this could result in frobbing of a non-present socket if
      sotryfree() actually frees the socket.
  
    - Note that sofree()/sotryfree() will release the socket lock even if
      they don't free the socket.
  
    Submitted by:   sam
    Sponsored by:   FreeBSD Foundation
    Obtained from:  BSD/OS
  
  Revision  Changes    Path
  1.52      +1 -0      src/sys/netinet6/in6_pcb.c



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