diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-13 13:08:59 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-13 13:08:59 +0000 |
commit | d1e024176c87a67967f6f420011d4067fe2a0944 (patch) | |
tree | 12fff95b1415486a2c56a399c96ba260a8f96e18 /sys/arch/octeon | |
parent | c91ef0f523c6bacfcf722eb21933240ac641b84d (diff) |
The kernel crypto framework sometimes returned an error, sometimes
the callback was called, and sometimes both. So the caller of that
API could not release resources correctly.
A bunch of errors can or should not happen, replace them with an
assert. Remove redundant checks. crypto_invoke() should not return
the error, but pass it via callback.
Some old hardware drivers keep part of their inconsistency as I
cannot test them.
OK mpi@
Diffstat (limited to 'sys/arch/octeon')
-rw-r--r-- | sys/arch/octeon/dev/octcrypto.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/arch/octeon/dev/octcrypto.c b/sys/arch/octeon/dev/octcrypto.c index abfa258dce2..26449679790 100644 --- a/sys/arch/octeon/dev/octcrypto.c +++ b/sys/arch/octeon/dev/octcrypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octcrypto.c,v 1.5 2021/07/08 09:22:30 bluhm Exp $ */ +/* $OpenBSD: octcrypto.c,v 1.6 2021/10/13 13:08:58 bluhm Exp $ */ /* * Copyright (c) 2018 Visa Hankala @@ -597,9 +597,6 @@ octcrypto_process(struct cryptop *crp) int error = 0; int i; - if (crp == NULL || crp->crp_callback == NULL) - return EINVAL; - KASSERT(crp->crp_ndesc >= 1); smr_read_enter(); |