]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Don't return errors from the cryptodev_process() method.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 8 Sep 2020 22:41:35 +0000 (22:41 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 8 Sep 2020 22:41:35 +0000 (22:41 +0000)
commit895c98cc294f2a87ae0af3cb404264443b17d305
tree3fa42e9ddd3a2cbddeabf306974c758fc8ee0bc0
parentcea05ed9a99ebca658b7bc3118b260fbbef374aa
Don't return errors from the cryptodev_process() method.

The cryptodev_process() method should either return 0 if it has
completed a request, or ERESTART to defer the request until later.  If
a request encounters an error, the error should be reported via
crp_etype before completing the request via crypto_done().

Fix a few more drivers noticed by asomers@ similar to the fix in
r365389.  This is an old bug, but went unnoticed since crypto requests
did not start failing as a normal part of operation until digest
verification was introduced which can fail requests with EBADMSG.

PR: 247986
Reported by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D26361
sys/crypto/armv8/armv8_crypto.c
sys/dev/hifn/hifn7751.c
sys/dev/safe/safe.c