Author: emaste
Date: Thu Aug  8 14:34:53 2019
New Revision: 350750
URL: https://svnweb.freebsd.org/changeset/base/350750

Log:
  armv8crypto: add missing unlock for session (after r336439)
  
  Attempts to use cryptodev (e.g. tests at /usr/src/tests/sys/opencrypto
  with armv8crypto added to the module lists) were causing a panic.
  
  Submitted by: Greg V <greg_unrelenting.technology>
  Differential Revision:        https://reviews.freebsd.org/D21012

Modified:
  head/sys/crypto/armv8/armv8_crypto.c

Modified: head/sys/crypto/armv8/armv8_crypto.c
==============================================================================
--- head/sys/crypto/armv8/armv8_crypto.c        Thu Aug  8 11:43:09 2019        
(r350749)
+++ head/sys/crypto/armv8/armv8_crypto.c        Thu Aug  8 14:34:53 2019        
(r350750)
@@ -274,9 +274,11 @@ armv8_crypto_newsession(device_t dev, crypto_session_t
        error = armv8_crypto_cipher_setup(ses, encini);
        if (error != 0) {
                CRYPTDEB("setup failed");
+               rw_wunlock(&sc->lock);
                return (error);
        }
 
+       rw_wunlock(&sc->lock);
        return (0);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to