svn commit: r275575 - head/sys/netipsec

Andrey V. Elsukov ae at FreeBSD.org
Sun Dec 7 06:47:00 UTC 2014


Author: ae
Date: Sun Dec  7 06:47:00 2014
New Revision: 275575
URL: https://svnweb.freebsd.org/changeset/base/275575

Log:
  key_getspacq() returns holding the spacq_lock. Unlock it in all cases.
  
  MFC after:	1 week
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netipsec/key.c

Modified: head/sys/netipsec/key.c
==============================================================================
--- head/sys/netipsec/key.c	Sat Dec  6 22:57:19 2014	(r275574)
+++ head/sys/netipsec/key.c	Sun Dec  7 06:47:00 2014	(r275575)
@@ -2313,7 +2313,8 @@ key_spdacquire(struct secpolicy *sp)
 		} else {
 			/* increment counter and do nothing. */
 			newspacq->count++;
-			return 0;
+			SPACQ_UNLOCK();
+			return (0);
 		}
 		SPACQ_UNLOCK();
 	} else {


More information about the svn-src-all mailing list