Skip to content

Comments

Fix a deadlock in OBJ_NAME_add#17236

Closed
bernd-edlinger wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
bernd-edlinger:fix_deadlock_in_init_crypto_1
Closed

Fix a deadlock in OBJ_NAME_add#17236
bernd-edlinger wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
bernd-edlinger:fix_deadlock_in_init_crypto_1

Conversation

@bernd-edlinger
Copy link
Member

This fixes a deadlock after an out of memory error
this is for 1.1.1 only, since master seems to have this already fixed.

@bernd-edlinger bernd-edlinger added the branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) label Dec 8, 2021
This happened after an out of memory error:
CRYPTO_THREAD_write_lock may hang in OBJ_NAME_add.
@bernd-edlinger bernd-edlinger force-pushed the fix_deadlock_in_init_crypto_1 branch from ce52640 to bb105ac Compare December 8, 2021 13:50
@bernd-edlinger bernd-edlinger changed the title Fix a deadlock in in OBJ_NAME_add Fix a deadlock in OBJ_NAME_add Dec 8, 2021
if (names_lh == NULL) {
CRYPTO_THREAD_lock_free(obj_lock);
obj_lock = NULL;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part of the change does not appear to be in master

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, this is of course only a memory leak, would you support having this in master?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #17238

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you support having this in master?

Yes.

@t8m t8m added approval: done This pull request has the required number of approvals triaged: bug The issue/pr is/fixes a bug labels Dec 8, 2021
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Dec 9, 2021
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Dec 9, 2021
@bernd-edlinger
Copy link
Member Author

Merged to 1.1.1 as ca607d6. Thanks!

openssl-machine pushed a commit that referenced this pull request Dec 9, 2021
This happened after an out of memory error:
CRYPTO_THREAD_write_lock may hang in OBJ_NAME_add.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #17236)