]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Expand scope of tun/tap softc locks to cover more softc fields and
authorjhb <jhb@FreeBSD.org>
Wed, 22 Sep 2010 21:02:43 +0000 (21:02 +0000)
committerjhb <jhb@FreeBSD.org>
Wed, 22 Sep 2010 21:02:43 +0000 (21:02 +0000)
commitb8914d3479db5650649ae5be1ae05dfdbdcc6b6c
treefc434fa0474d6dd93c7659408c21921cc4525ec1
parent1efa60231a30195287137b26cd7f9fb666f48677
- Expand scope of tun/tap softc locks to cover more softc fields and
  driver-maintained ifnet fields (such as if_drv_flags).
- Use soft locks as the mutex that protects each interface's knote list
  rather than using the global knote list lock.  Also, use the softc
  for kn_hook instead of the cdev.
- Use mtx_sleep() instead of tsleep() when blocking in the read routines.
  This fixes a lost wakeup race.
- Remove D_NEEDGIANT now that the cdevsw routines use the softc lock
  where locking is needed.
- Lock IFQ when calculating the result for FIONREAD in tap(4).  tun(4)
  already did this.
- Remove remaining spl calls.

Submitted by: Marcin Cieslak  saper of saper|info (3)
MFC after: 2 weeks
sys/net/if_tap.c
sys/net/if_tun.c