Skip to content

Commit 7ca42d1

Browse files
committed
bsdkm: return 0 from wolfkdriv_process() to comply with opencrypto(9)
cryptodev_process must return 0 once crypto_done() has fired; errors are reported via crp_etype, otherwise the framework may re-dispatch an already-completed request. Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
1 parent 43e44cb commit 7ca42d1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bsdkm/wolfkmod.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,8 @@ static int wolfkdriv_process(device_t dev, struct cryptop * crp, int hint)
10201020
csp->csp_mode, csp->csp_cipher_alg, error);
10211021
#endif /* WOLFSSL_BSDKM_VERBOSE_DEBUG */
10221022

1023-
return (error);
1023+
/* opencrypto(9) contract: return 0 after crypto_done(); error is in crp_etype. */
1024+
return (0);
10241025
}
10251026

10261027
/*

0 commit comments

Comments
 (0)