Page MenuHomeFreeBSD

crypto: Remove most uses of CRYPTO_F_DONE
Needs ReviewPublic

Authored by markj on Thu, May 1, 2:27 PM.

Details

Reviewers
jhb
Summary

Previously OCF set CRYPTO_F_DONE prior to invoking the completion
callback, even if the request failed. This isn't particularly useful
and leads to bugs when consumers retry a failed request, since OCF also
asserts that CRYPTO_F_DONE is clear in crypto_dispatch(). (Really, OCF
should retry requests that fail with EAGAIN, but that's a larger
change.)

For now, just stop setting CRYPTO_F_DONE to simplify consumers (and fix
those which fail to clear the flag before retrying a request). In krb5,
keep using it, but set it in the callback. Fix buggy handling of EAGAIN
there as well. Panic if the request fails for a different reason, since
we can't signal it to upper layers.

PR: 286321

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63820
Build 60704: arc lint + arc unit