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
This commit is contained in:
Ed Maste 2019-08-08 14:34:53 +00:00
parent deb2aead4a
commit 8279d4b711

View File

@ -274,9 +274,11 @@ armv8_crypto_newsession(device_t dev, crypto_session_t cses,
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);
}