aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgbe/tom/t4_tom.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2021-05-20 23:03:19 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-05-28 23:47:04 +0000
commitf949967c8eb3ab5e5a965e3cf07a726dfdc81263 (patch)
tree84a8824f6638f1b3b7597b36ae067ffb8d2ec4d6 /sys/dev/cxgbe/tom/t4_tom.c
parent67360f7bb0bb575d823c21420abaf165ecf62066 (diff)
downloadsrc-f949967c8eb3ab5e5a965e3cf07a726dfdc81263.tar.gz
src-f949967c8eb3ab5e5a965e3cf07a726dfdc81263.zip
cxgbei: Fix a race between transfer setup and a peer reset.
In 4427ac3675f9, the TOM driver stopped sending work requests to program iSCSI page pods directly and instead queued them to be written asynchronously with iSCSI PDUs. The queue of mbufs to send is protected by the inp lock. However, the inp cannot be safely obtained from the toep since a RST from the remote peer might have cleared toep->inp asynchronously in an ithread. To fix, obtain the inp from the socket as is already done in icl_cxgbei_conn_pdu_queue_cb() and fail the new transfer setup with ECONNRESET if the connection has been reset. To avoid passing sockets or inps into the page pod routines, pull the mbufq out of the two relevant page pod routines such that the routines queue new work request mbufs to a caller-supplied mbufq. Reported by: Jithesh Arakkan @ Chelsio Fixes: 4427ac3675f91df039d54a23518132e0e0fede86
Diffstat (limited to 'sys/dev/cxgbe/tom/t4_tom.c')
0 files changed, 0 insertions, 0 deletions