Author: ae
Date: Tue Dec 16 11:30:29 2014
New Revision: 275824
URL: https://svnweb.freebsd.org/changeset/base/275824

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

Modified:
  stable/9/sys/netipsec/key.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netipsec/key.c
==============================================================================
--- stable/9/sys/netipsec/key.c Tue Dec 16 11:25:12 2014        (r275823)
+++ stable/9/sys/netipsec/key.c Tue Dec 16 11:30:29 2014        (r275824)
@@ -2328,7 +2328,8 @@ key_spdacquire(sp)
                } else {
                        /* increment counter and do nothing. */
                        newspacq->count++;
-                       return 0;
+                       SPACQ_UNLOCK();
+                       return (0);
                }
                SPACQ_UNLOCK();
        } else {
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to