Skip to content

remove the risk of file descriptor reuse from arping#17

Open
JacobTanenbaum wants to merge 1 commit into
j-keck:masterfrom
JacobTanenbaum:threading
Open

remove the risk of file descriptor reuse from arping#17
JacobTanenbaum wants to merge 1 commit into
j-keck:masterfrom
JacobTanenbaum:threading

Conversation

@JacobTanenbaum

@JacobTanenbaum JacobTanenbaum commented Feb 1, 2024

Copy link
Copy Markdown

using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read from it and cause the goroutine to deadlock.

removing the sock.deinitialize() from the timeout select case as it will be taken care of by the goroutine upon its return

using sock.deinitialize() outside of the goroutine that is using the
socket leaves the potential for erroneous and unexpected behavior. When
calling Ping() very quickly the socket fd can be reused while a
goroutine is still trying to read from it and cause the goroutine to
deadlock.

removing the sock.deinitialize() from the timeout select case as it will
be taken care of by the goroutine upon its return

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
JacobTanenbaum added a commit to JacobTanenbaum/ovn-kubernetes that referenced this pull request Feb 9, 2024
here is the PR for the upstream version j-keck/arping#17

'
using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and
unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read
from it and cause the goroutine to deadlock.

removing the sock.deinitialize() from the timeout select case as it will
be taken care of by the goroutine upon its return'

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
jcaamano pushed a commit to ovn-kubernetes/ovn-kubernetes that referenced this pull request Feb 9, 2024
here is the PR for the upstream version j-keck/arping#17

'
using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and
unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read
from it and cause the goroutine to deadlock.

removing the sock.deinitialize() from the timeout select case as it will
be taken care of by the goroutine upon its return'

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
@openshift-merge-robot

Copy link
Copy Markdown

Fix included in accepted release 4.16.0-0.nightly-2024-02-17-013806

JacobTanenbaum added a commit to JacobTanenbaum/ovn-kubernetes-1 that referenced this pull request Apr 1, 2024
here is the PR for the upstream version j-keck/arping#17

'
using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and
unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read
from it and cause the goroutine to deadlock.

removing the sock.deinitialize() from the timeout select case as it will
be taken care of by the goroutine upon its return'

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
JacobTanenbaum added a commit to JacobTanenbaum/ovn-kubernetes-1 that referenced this pull request May 15, 2024
here is the PR for the upstream version j-keck/arping#17

'
using sock.deinitialize() outside of the goroutine that is using the socket leaves the potential for erroneous and
unexpected behavior. When calling Ping() very quickly the socket fd can be reused while a goroutine is still trying to read
from it and cause the goroutine to deadlock.

removing the sock.deinitialize() from the timeout select case as it will
be taken care of by the goroutine upon its return'

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
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.

2 participants