summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2019-10-10 10:16:11 +0200
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-10-10 19:08:41 -0700
commit107529e31a87acd475ff6a0f82745821b8f70fec (patch)
treeefa404f6ebfcdca077aedf2b5c5eba7c68b6f049 /block
parent882dcfe5a1785c20f45820cbe6fec4b8b647c946 (diff)
downloadlinux-107529e31a87acd475ff6a0f82745821b8f70fec.tar.gz
linux-107529e31a87acd475ff6a0f82745821b8f70fec.tar.bz2
linux-107529e31a87acd475ff6a0f82745821b8f70fec.zip
net/smc: receive pending data after RCV_SHUTDOWN
smc_rx_recvmsg() first checks if data is available, and then if RCV_SHUTDOWN is set. There is a race when smc_cdc_msg_recv_action() runs in between these 2 checks, receives data and sets RCV_SHUTDOWN. In that case smc_rx_recvmsg() would return from receive without to process the available data. Fix that with a final check for data available if RCV_SHUTDOWN is set. Move the check for data into a function and call it twice. And use the existing helper smc_rx_data_available(). Fixes: 952310ccf2d8 ("smc: receive data from RMBE") Reviewed-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions