cvs commit: src/sys/net if_vlan.c

Yar Tikhiy yar at FreeBSD.org
Wed Aug 9 15:04:39 UTC 2006


yar         2006-08-09 15:04:30 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/net              if_vlan.c 
  Log:
  Destroy the cloned interfaces before, not after, detaching
  from the cloner structure in the module unload handler.
  The cloner structure was likely to be destroyed on detachment,
  which led to panic later, when its destroyed mutex was locked
  or whatever.  It was just another "use after free" case.
  
  Now it is theoretically possible to create a vlan interface in
  between the loop over the interfaces and the call to if_clone_detach().
  We have to live with it in 6-STABLE.  In CURRENT, the actions are
  serialized properly in if_clone_detach(): remove cloner from the
  global list, destroy the cloned interfaces on it, detach from the
  cloner.
  
  This fix doesn't apply to HEAD, in which all the work is done by
  if_clone_detach(), so it goes immediately to RELENG_6.
  
  Revision   Changes    Path
  1.79.2.11  +3 -3      src/sys/net/if_vlan.c


More information about the cvs-all mailing list