OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_0-117-g9e98d61
Gerrit Code Review
gerrit@openafs.org
Sat, 27 Feb 2021 21:30:40 -0500
The following commit has been merged in the master branch:
commit 9e98d61ff41709cee8d484be1ecd638a18e2ce0f
Author: Tim Creech <tcreech@tcreech.com>
Date: Sat Dec 21 18:22:40 2019 -0600
FBSD: Add proper locks when traversing net ifaces
When traversing the list of network interfaces, or the list of
addresses for a network interface, we're supposed to lock the relevant
resource with IFNET_RLOCK, if_addr_rlock, or IN_IFADDR_RLOCK. Add
these locks around our code that examines network interfaces, to
avoid issues if the interface or address list changes while we're
traversing them.
While we're doing this, move around some "AFS_DARWIN_ENV ||
AFS_FBSD_ENV" ifdefs, since these were getting a bit hard to read.
This commit adds some duplicated code, but the result should be easier
to follow.
Also for FreeBSD 12, we must be in NET_EPOCH_ENTER when calling
ifa_ifwithnet/rx_ifaddr_withnet (it panics if we don't, with
INVARIANTS). Add the needed NET_EPOCH_ENTER/EXIT calls, but do so a
bit higher up the call stack, since the returned structures are
potentially no longer valid after we NET_EPOCH_EXIT. Since this means
we're calling these in a few places in libafs, create a couple of rx
abstractions (RX_NET_EPOCH_ENTER) to handle the relevant ifdefs.
[adeason@dson.org: Various adjustments to locking calls; splitting up
DARWIN/FBSD ifdefs.]
Change-Id: I65d63b99b6f6ef3254325cce9338be27ef78478c
Reviewed-on: https://gerrit.openafs.org/13998
Reviewed-by: Tim Creech <tcreech@tcreech.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_call.c | 6 ++++++
src/afs/afs_server.c | 3 +++
src/afs/sysincludes.h | 1 +
src/rx/rx_kcommon.c | 27 +++++++++++++++++++++------
src/rx/rx_kernel.h | 8 ++++++++
5 files changed, 39 insertions(+), 6 deletions(-)
--
OpenAFS Master Repository