/[base]
ViewVC logotype

Revision 312782


Jump to revision: Previous Next
Author: kp
Date: Wed Jan 25 21:25:26 2017 UTC (7 years, 5 months ago)
Changed paths: 2
Log Message:
bridge: Release the bridge lock when calling bridge_set_ifcap()

This calls ioctl() handlers for the different interfaces in the bridge.
These handlers expect to get called in an ioctl context where it's safe
for them to sleep. We may not sleep with the bridge lock held.

However, we still need to protect the interface list, to ensure it
doesn't get changed while we iterate over it.
Use BRIDGE_XLOCK(), which prevents bridge members from being removed.
Adding bridge members is safe, because it uses LIST_INSERT_HEAD().

This caused panics when adding xen interfaces to a bridge.

PR:		216304
Reviewed by:	ae
MFC after:	1 week
Sponsored by:	RootBSD
Differential Revision:	https://reviews.freebsd.org/D9290


Changed paths

Path Details
Directoryhead/sys/net/if_bridge.c modified , text changed
Directoryhead/sys/net/if_bridgevar.h modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27