Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ping: read from error queue when POLLERR is set #75

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

soheilhy
Copy link
Contributor

Upon POLLERR, ping reads from the socket and, unless there is
an errno other than EAGAIN or EINTR, it will not read the error
queue.

However, due to races on sk->sk_err, it is more robust to
always read the error queue when the socket read retruns
an EAGAIN and poll returns POLLERR.

Fixes #74

Upon POLLERR, ping reads from the socket and, unless there is
an errno other than EAGAIN or EINTR, it will not read the error
queue.

However, due to races on sk->sk_err, it is more robust to
always read the error queue when the socket read retruns
an EAGAIN and poll returns POLLERR.

Tested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants