HomeFreeBSD

Add locks before each ena_up and ena_down

Description

Add locks before each ena_up and ena_down

Lock only ena_up and ena_down calls in ioctl handler, instead of whole
ioctl. Locking ioctl with sx lock that is sleepable, is not allowed in
some cases, e.g. when multicast options are being changed.
Additional locking was added in deatch function to prevent race condition
with ioctl function.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10924

Details

Committed
zbbMay 30 2017, 11:55 AM
Differential Revision
D10924: ena: add locks before each ena_up and ena_down
Parents
rS319197: Add mbuf defragmentation to the ENA driver
Branches
Unknown
Tags
Unknown