HomeFreeBSD

MFC r308580:

Description

MFC r308580:

Don't read if_counters with if_addr_lock held

Calling into an ifnet implementation with the if_addr_lock already
held can cause a LOR and potentially a deadlock, as ifnet
implementations typically can take the if_addr_lock after their
own locks during configuration.  Refactor a sysctl handler that
was violating this to read if_counter data in a temporary buffer
before the if_addr_lock is taken, and then copying the data
in its final location later, when the if_addr_lock is held.

PR: [[ https://bugs.freebsd.org/194109 | 194109 ]]
Reported by: Jean-Sebastien Pedron
MFC after: 2 weeks
Differential Revision:        https://reviews.freebsd.org/D8498
Reviewed by: sbruno

Details

Provenance
rstoneAuthored on
Parents
rS309176: Update build glue for llvm/clang 3.9.1.
Branches
Unknown
Tags
Unknown