Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2011 18:03:49 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/net if.c
Message-ID:  <201104062125.p36LP7Ps010872@repoman.freebsd.org>

index | next in thread | raw e-mail

glebius     2011-04-06 18:03:49 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_8)
    sys/net              if.c 
  Log:
  SVN rev 220397 on 2011-04-06 18:03:49Z by glebius
  
  MFhead 220317:
    When removing ifnets, we should first remove the reference to ifnet
    from the interface index, then decrease refcount, not vice versa.
  
    Otherwise there is a race (reproducible) when if_free_internal()
    contests on IFNET_WLOCK(), and we got a zero-refed ifnet in the
    index for a long time. It may be picked by some other thread,
    that runs ifnet_byindex_ref(), who takes the ifnet from index,
    and bumps refcount. When reader drops the lock, if_free_internal()
    proceeds with free. Then reader tries to free it a second time.
  
  Revision    Changes    Path
  1.359.2.30  +10 -9     src/sys/net/if.c


help

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