Searched hist:"0 ffe86f4" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/sunrpc/ |
H A D | xprtsock.c | 0ffe86f4 Wed Jan 30 13:51:26 CST 2019 Trond Myklebust <trond.myklebust@hammerspace.com> 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: Trond Myklebust <trond.myklebust@hammerspace.com> 0ffe86f4 Wed Jan 30 13:51:26 CST 2019 Trond Myklebust <trond.myklebust@hammerspace.com> 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: Trond Myklebust <trond.myklebust@hammerspace.com>
|