Page MenuHomeFreeBSD

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

Authored by markj on Jul 16 2020, 8:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:04 AM
Unknown Object (File)
Jul 22 2023, 5:45 AM
Unknown Object (File)
Jul 1 2023, 12:29 PM
Unknown Object (File)
Jul 1 2023, 12:28 PM
Unknown Object (File)
Jul 1 2023, 12:28 PM
Unknown Object (File)
Jul 1 2023, 12:16 PM
Unknown Object (File)
Apr 8 2023, 7:35 PM
Unknown Object (File)
Apr 8 2023, 7:30 PM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #74545)

[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 ↗(On Diff #74545)

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

sys/opencrypto/crypto.c
328 ↗(On Diff #74545)

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

sys/opencrypto/cryptodev.c
1318 ↗(On Diff #74545)

Ok. This bit actually comes from PR 240545.

This revision was automatically updated to reflect the committed changes.