diff options
| author | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2022-01-14 21:09:04 +0000 |
|---|---|---|
| committer | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2022-01-14 21:09:04 +0000 |
| commit | e0e12405285b61a724c646b8f8e99e3ec775291e (patch) | |
| tree | 9ce5f15b7685f8a60072b4b297c34eab39072b53 /sys/dev/bxe | |
| parent | 9f0b56872c1fb790f67ee45a56ceeeed5d17ddea (diff) | |
netmap: fix LOR in iflib_netmap_register
In iflib_device_register(), the CTX_LOCK is acquired first and then
IFNET_WLOCK is acquired by ether_ifattach(). However, in netmap_hw_reg()
we do the opposite: IFNET_RLOCK is acquired first, and then CTX_LOCK
is acquired by iflib_netmap_register(). Fix this LOR issue by wrapping
the CTX_LOCK/UNLOCK calls in iflib_device_register with an additional
IFNET_WLOCK. This is safe since the IFNET_WLOCK is recursive.
MFC after: 1 month
Diffstat (limited to 'sys/dev/bxe')
0 files changed, 0 insertions, 0 deletions
