Module Name:    src
Committed By:   knakahara
Date:           Fri Apr  6 09:24:13 UTC 2018

Modified Files:
        src/sys/net: if_ipsec.c

Log Message:
fix ipsec(4) encap_lock leak.

XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/net/if_ipsec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_ipsec.c
diff -u src/sys/net/if_ipsec.c:1.7 src/sys/net/if_ipsec.c:1.8
--- src/sys/net/if_ipsec.c:1.7	Tue Mar 13 02:12:05 2018
+++ src/sys/net/if_ipsec.c	Fri Apr  6 09:24:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ipsec.c,v 1.7 2018/03/13 02:12:05 knakahara Exp $  */
+/*	$NetBSD: if_ipsec.c,v 1.8 2018/04/06 09:24:13 knakahara Exp $  */
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.7 2018/03/13 02:12:05 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.8 2018/04/06 09:24:13 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1166,6 +1166,7 @@ if_ipsec_ensure_flags(struct ifnet *ifp,
 	if (if_ipsec_variant_is_unconfigured(ovar)) {
 		/* nothing to do */
 		mutex_exit(&sc->ipsec_lock);
+		encap_lock_exit();
 		return 0;
 	}
 

Reply via email to