mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
svcrdma: Fix race between svc_rdma_recvfrom thread and the dto_tasklet
RDMA_READ completions are kept on a separate queue from the general I/O request queue. Since a separate lock is used to protect the RDMA_READ completion queue, a race exists between the dto_tasklet and the svc_rdma_recvfrom thread where the dto_tasklet sets the XPT_DATA bit and adds I/O to the read-completion queue. Concurrently, the recvfrom thread checks the generic queue, finds it empty and resets the XPT_DATA bit. A subsequent svc_xprt_enqueue will fail to enqueue the transport for I/O and cause the transport to "stall". The fix is to protect both lists with the same lock and set the XPT_DATA bit with this lock held. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
30a2f3c60a
commit
24b8b44780
3 changed files with 6 additions and 8 deletions
|
@ -143,7 +143,6 @@ struct svcxprt_rdma {
|
|||
unsigned long sc_flags;
|
||||
struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */
|
||||
struct list_head sc_read_complete_q;
|
||||
spinlock_t sc_read_complete_lock;
|
||||
struct work_struct sc_work;
|
||||
};
|
||||
/* sc_flags */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue