Purely mechanical except for the early function-local sockaddr dance.

Feedback? OK?
---
 sys/netinet6/in6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 9e2691c5964..a3737914828 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -239,9 +239,7 @@ in6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, int 
privileged)
        case SIOCGIFNETMASK_IN6:
        case SIOCGIFAFLAG_IN6:
        case SIOCGIFALIFETIME_IN6:
-               KERNEL_LOCK();
                error = in6_ioctl_get(cmd, data, ifp);
-               KERNEL_UNLOCK();
                return (error);
        case SIOCAIFADDR_IN6:
        case SIOCDIFADDR_IN6:
@@ -431,6 +429,7 @@ in6_ioctl_get(u_long cmd, caddr_t data, struct ifnet *ifp)
                        return (error);
        }
 
+       KERNEL_LOCK();
        NET_LOCK_SHARED();
 
        if (sa6 != NULL) {
@@ -526,6 +525,7 @@ in6_ioctl_get(u_long cmd, caddr_t data, struct ifnet *ifp)
 
 err:
        NET_UNLOCK_SHARED();
+       KERNEL_UNLOCK();
        return (error);
 }
 
-- 
2.38.1


Reply via email to