Skip to content
Commit 0ffe86f4 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Use poll() to fix up the socket requeue races



Because we clear XPRT_SOCK_DATA_READY before reading, we can end up
with a situation where new data arrives, causing xs_data_ready() to
queue up a second receive worker job for the same socket, which then
immediately gets stuck waiting on the transport receive mutex.
The fix is to only clear XPRT_SOCK_DATA_READY once we're done reading,
and then to use poll() to check if we might need to queue up a new
job in order to deal with any new data.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent a1231fda
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment