Repository navigation
Commit f99fa50
SUNRPC/xprtrdma: Fix reconnection locking
The xprtrdma client code currently relies on the task that initiated the
connect to hold the XPRT_LOCK for the duration of the connection
attempt. If the task is woken early, due to some other event, then that
lock could get released early.
Avoid races by using the same mechanism that the socket code uses of
transferring lock ownership to the RDMA connect worker itself. That
frees us to call rpcrdma_xprt_disconnect() directly since we're now
guaranteed exclusion w.r.t. other callers.
Fixes: 4cf44be ("xprtrdma: Fix recursion into rpcrdma_xprt_disconnect()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>1 parent e26d997 commit f99fa50
2 files changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| 880 | + | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
| |||
893 | 894 | | |
894 | 895 | | |
895 | 896 | | |
| 897 | + | |
896 | 898 | | |
897 | 899 | | |
898 | 900 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
259 | 256 | | |
260 | 257 | | |
261 | 258 | | |
| |||
489 | 486 | | |
490 | 487 | | |
491 | 488 | | |
| 489 | + | |
| 490 | + | |
492 | 491 | | |
493 | 492 | | |
494 | 493 | | |
| |||
0 commit comments