Always check CRYPTO_LOCK_{read,write}_lock #14238
Conversation
| /* | ||
| * Can't return something, so best to hope that something will | ||
| * fail later. :( | ||
| */ |
kroeckx
Feb 25, 2021
Member
Is there a reason you can't make this function return something?
Is there a reason you can't make this function return something?
richsalz
Feb 25, 2021
Author
Contributor
it's a new_func function used in the crypto "exdata" stuff. Look how "new_func" is used in crypto/ex_data.c Changing it to non-void would be lots of work and subtly breaking things.
it's a new_func function used in the crypto "exdata" stuff. Look how "new_func" is used in crypto/ex_data.c Changing it to non-void would be lots of work and subtly breaking things.
|
rebased to fix conflicts. will wait until you are done with the review @kroeckx . Thanks for the incredibly detailed comments! |
|
Pushed a fixup commit that address all of @kroeckx 's wonderful detailed feedback. (Not gonna lie: it was a pain going through and responding, but he was pretty much always right so it made this PR better.) |
|
rebased to fix conflict ("Cert" vs "cert" in a comment so important :) and had to add a couple of additional cases to core_provider. updated fixup commit pushed. |
|
Oopsed it I think :( |
|
Ping for review. |
|
rebase time also.. |
|
rebased to fix small conflict |
|
looks like rebase pulled in a new change :) Error.. |
Some functions that lock things are void, so we just return early. Also make ossl_namemap_empty return 0 on error. Updated the docs, and added some code to ossl_namemap_stored() to handle the failure, and updated the tests to allow for failure. Fixes: #14230
|
YARS (Yet another rebase and squash) because someone added a locking call and the CI broke. |
|
24 hours has passed since 'approval: done' was set, but this PR has failing CI tests. Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually. |
|
CI isn't relevant. Merged to master, thanks for the contribution. |
Some functions that lock things are void, so we just return early. Also make ossl_namemap_empty return 0 on error. Updated the docs, and added some code to ossl_namemap_stored() to handle the failure, and updated the tests to allow for failure. Fixes: #14230 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from #14238)
Some functions that lock things are void, so we just return early.
Fixes: #14230
Also marks the lock routines
__owurso the error doesn't propagate.