]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: put slot when connection is killed
authorKarsten Graul <kgraul@linux.ibm.com>
Mon, 20 Jul 2020 14:24:28 +0000 (16:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 00:52:25 +0000 (17:52 -0700)
commit250b5b9e3a9dd05092d26c65e3e0ef9c518dbe6a
treec5e444b1b5fe332f5ad79a8a4e066fb8fcd8e44a
parentdd0502c46a60e7982ca2b8ecab8fa687071e77bc
net/smc: put slot when connection is killed

To get a send slot smc_wr_tx_get_free_slot() is called, which might
wait for a free slot. When smc_wr_tx_get_free_slot() returns there is a
check if the connection was killed in the meantime. In that case don't
only return an error, but also put back the free slot.

Fixes: 5758535bef7b ("net/smc: cancel send and receive for terminated socket")
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_cdc.c