Module Name:    src
Committed By:   maxv
Date:           Tue Nov  4 16:01:58 UTC 2014

Modified Files:
        src/sys/secmodel: secmodel.c

Log Message:
Do not release secmodels_lock when it is not held.

Sent on tech-kern@, ok lars@


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/secmodel/secmodel.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/secmodel/secmodel.c
diff -u src/sys/secmodel/secmodel.c:1.1 src/sys/secmodel/secmodel.c:1.2
--- src/sys/secmodel/secmodel.c:1.1	Sun Dec  4 19:24:59 2011
+++ src/sys/secmodel/secmodel.c	Tue Nov  4 16:01:58 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel.c,v 1.1 2011/12/04 19:24:59 jym Exp $ */
+/* $NetBSD: secmodel.c,v 1.2 2014/11/04 16:01:58 maxv Exp $ */
 /*-
  * Copyright (c) 2011 Elad Efrat <e...@netbsd.org>
  * All rights reserved.
@@ -171,10 +171,8 @@ secmodel_plug(secmodel_t sm)
 	secmodel_t tsm;
 	int error = 0;
 
-	if (sm == NULL) {
-		error = EFAULT;
-		goto out;
-	}
+	if (sm == NULL)
+		return EFAULT;
 
 	/* Check if the secmodel is already present. */
 	rw_enter(&secmodels_lock, RW_WRITER);
@@ -203,10 +201,8 @@ secmodel_unplug(secmodel_t sm)
 	secmodel_t tsm;
 	int error = 0;
 
-	if (sm == NULL) {
-		error = EFAULT;
-		goto out;
-	}
+	if (sm == NULL)
+		return EFAULT;
 
 	/* Make sure the secmodel is present. */
 	rw_enter(&secmodels_lock, RW_WRITER);

Reply via email to