K 10 svn:author V 9 vmaffione K 8 svn:date V 27 2022-02-13T10:49:18.210967Z K 7 svn:log V 632 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 (cherry picked from commit e0e12405285b61a724c646b8f8e99e3ec775291e) Git Hash: ea25a6af57e0ce1551341e3b1652233cdb11bee1 Git Author: vmaffione@FreeBSD.org END