Unbreak, don't assume we always hold the NET_LOCK
authorjca <jca@openbsd.org>
Sun, 14 Aug 2022 21:10:08 +0000 (21:10 +0000)
committerjca <jca@openbsd.org>
Sun, 14 Aug 2022 21:10:08 +0000 (21:10 +0000)
commitcaaad5e703613714bab53473d4f634bfd7dbf163
tree3b71afdc324737a2b26340f880098c56df2de54a
parent2f07e5c04e02a59e180bb369078d11454d296b70
Unbreak, don't assume we always hold the NET_LOCK

After net/if.c:rev 1.661 ifioctl() doesn't take the net lock any more
around SIOCGIFMEDIA and SIOCSIFMEDIA, which broke cad_ioctl().
The same was already true about SIOCGIFSFFPAGE.  Only release/reacquire
the net lock if warranted.

Input mvs@, ok miod@ mvs@ bluhm@
sys/dev/fdt/if_cad.c