diff options
| author | R. Christian McDonald <rcm@FreeBSD.org> | 2026-11-16 17:41:39 +0000 |
|---|---|---|
| committer | R. Christian McDonald <rcm@FreeBSD.org> | 2026-11-16 17:42:49 +0000 |
| commit | b9e45c2dca5cf003bb999dffba5eb3c8ed053e51 (patch) | |
| tree | 9748e3318df58306ff261f3e4338cab74d1a7017 /sys/dev/spibus/controller/rockchip | |
| parent | c27f0ee61fc4d13c0eb18ab5d542b349c0eab5b4 (diff) | |
When a crypto driver unregisters, a request on one of its sessions
completes with EAGAIN. The ESP, AH and IPComp callbacks then move the
SA to the new session and pass the same request to crypto_dispatch()
again, with crp_etype still set to EAGAIN.
crypto_dispatch() requires a request without an error. A kernel with
INVARIANTS panics there with "incoming crp with error". The other
consumers that dispatch a request again after EAGAIN clear the field
first.
The six callbacks prepare the request for the retry with the same
code. Move that code to a new function, ipsec_crypto_retry(), and
clear the error there. ipsec_updateid() has no other callers and
becomes static. The callbacks still dispatch the request themselves,
because the input callbacks have to release the sahtree lock first.
Reviewed by: markj, kib
Fixes: c03414326909 ("Refactor driver and consumer...")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D61515
Diffstat (limited to 'sys/dev/spibus/controller/rockchip')
0 files changed, 0 insertions, 0 deletions
