Skip to content

Add missing locks around broadcasts#996

Merged
thaJeztah merged 1 commit intomoby:masterfrom
msg555:locked_broadcasts
May 11, 2019
Merged

Add missing locks around broadcasts#996
thaJeztah merged 1 commit intomoby:masterfrom
msg555:locked_broadcasts

Conversation

@msg555
Copy link
Copy Markdown
Contributor

@msg555 msg555 commented May 9, 2019

To avoid race conditions related to broadcasting prior to the intended thread having invoked Wait already you need to lock the wrapping mutex before broadcasting.

https://pastebin.com/tNitJ5L2 demonstrates why unlocked broadcasts are problematic.

@msg555 msg555 force-pushed the locked_broadcasts branch from 82b043e to 6b68bf1 Compare May 10, 2019 16:57
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

@msg555 could you perhaps update your sign-off to use your actual name (instead of msg)?

Signed-off-by: msg <msg@clinc.com>

You can configure your name in your git configuration (so it would use it automatically if you use commit -s next time)

Signed-off-by: Mark Gordon <msg555@gmail.com>
@msg555 msg555 force-pushed the locked_broadcasts branch from 6b68bf1 to 78a8e64 Compare May 10, 2019 22:27
@msg555
Copy link
Copy Markdown
Contributor Author

msg555 commented May 10, 2019

Updated sign off, my mistake

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

no worries! Thanks for fixing the sign off

LGTM

@thaJeztah thaJeztah merged commit 3780f5d into moby:master May 11, 2019
@thaJeztah
Copy link
Copy Markdown
Member

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants