]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ena: Add locking assertions
authorArtur Rojek <ar@semihalf.com>
Thu, 12 Aug 2021 08:34:26 +0000 (10:34 +0200)
committerMarcin Wojtas <mw@FreeBSD.org>
Wed, 1 Sep 2021 23:06:21 +0000 (01:06 +0200)
commitcb98c439d66c303353a9f4abbbe9ddb51559c638
treed906b8851039db458a62675e0f5506c6763fc376
parent77160654a162b5faa8ad7a02e18d2bef2589f868
ena: Add locking assertions

ENA silently assumed that ena_up, ena_down and ena_start_xmit routines
should be called within locked context. Driver's logic heavily assumes
on concurrent access to those routines, so for safety and better
documentation about this assumption, the locking assertions were added
to the above functions.

The assertion was added only for the main steps (skipping the helper
functions) which can be called from multiple places including the kernel
and the driver itself.

Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
sys/dev/ena/ena.c
sys/dev/ena/ena.h
sys/dev/ena/ena_datapath.c