Another mechanical diff without semantic changes to avoid churn in actual
unlocking diffs.
OK mpi
-/* $OpenBSD: if.c,v 1.666 2022/11/08 11:25:01 kn Exp $ */
+/* $OpenBSD: if.c,v 1.667 2022/11/08 15:20:24 kn Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
case SIOCGIFRDOMAIN:
case SIOCGIFGROUP:
case SIOCGIFLLPRIO:
- KERNEL_LOCK();
error = ifioctl_get(cmd, data);
- KERNEL_UNLOCK();
return (error);
}
size_t bytesdone;
const char *label;
+ KERNEL_LOCK();
+
switch(cmd) {
case SIOCGIFCONF:
NET_LOCK_SHARED();
}
ifp = if_unit(ifr->ifr_name);
- if (ifp == NULL)
+ if (ifp == NULL) {
+ KERNEL_UNLOCK();
return (ENXIO);
+ }
NET_LOCK_SHARED();
NET_UNLOCK_SHARED();
+ KERNEL_UNLOCK();
+
if_put(ifp);
return (error);