Page MenuHomeFreeBSD

crypto(9): Remove some unnecessary error handling.
ClosedPublic

Authored by markj on Jul 16 2020, 8:43 PM.
Tags
None
Referenced Files
F115209995: D25696.id74575.diff
Mon, Apr 21, 11:22 AM
Unknown Object (File)
Sat, Apr 5, 6:33 AM
Unknown Object (File)
Mar 19 2025, 6:40 PM
Unknown Object (File)
Mar 7 2025, 10:02 PM
Unknown Object (File)
Mar 2 2025, 4:24 PM
Unknown Object (File)
Mar 2 2025, 1:51 PM
Unknown Object (File)
Mar 2 2025, 12:18 PM
Unknown Object (File)
Mar 2 2025, 12:55 AM
Subscribers

Details

Summary

crypto_init() is called from a module load handler and is thus allowed
to sleep. So:

  • uma_zcreate() doesn't fail, so stop handling failures
  • stop handling M_WAITOK allocation failures
  • convert M_NOWAIT allocations in crypto_init() to M_WAITOK
  • fix some style bugs in crypto_init()

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 32372
Build 29853: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jul 16 2020, 8:43 PM
markj created this revision.
delphij added inline comments.
sys/opencrypto/crypto.c
328

[OPTIONAL] This should probably go in a different changeset, but I'm fine if it's left as-is too.

This revision is now accepted and ready to land.Jul 16 2020, 9:06 PM
jhb added inline comments.
sys/opencrypto/cryptodev.c
1318

This one isn't crypto_init(), so I would perhaps commit it separately?

sys/opencrypto/crypto.c
328

Since the whole thing is trivial cleanup, I tend to prefer just a single commit.

sys/opencrypto/cryptodev.c
1318

Ok. This bit actually comes from PR 240545.

This revision was automatically updated to reflect the committed changes.