Tony Lu 00e158fb91 net/smc: Keep smc_close_final rc during active close
When smc_close_final() returns error, the return code overwrites by
kernel_sock_shutdown() in smc_close_active(). The return code of
smc_close_final() is more important than kernel_sock_shutdown(), and it
will pass to userspace directly.

Fix it by keeping both return codes, if smc_close_final() raises an
error, return it or kernel_sock_shutdown()'s.

Link: https://lore.kernel.org/linux-s390/1f67548e-cbf6-0dce-82b5-10288a4583bd@linux.ibm.com/
Fixes: 606a63c9783a ("net/smc: Ensure the active closing peer first closes clcsock")
Suggested-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Acked-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02 12:14:36 +00:00
..
2021-11-04 21:04:25 +09:00
2021-10-13 09:40:46 -07:00
2021-10-24 13:59:45 +01:00
2021-10-13 09:40:45 -07:00
2021-10-25 11:01:29 -07:00
2021-06-29 11:28:21 -07:00
2021-05-26 07:03:39 +02:00
2021-10-13 09:40:46 -07:00
2021-10-13 09:40:45 -07:00
2021-10-14 23:06:44 +02:00
2021-10-13 09:40:45 -07:00
2021-11-02 06:20:58 -07:00
2021-06-03 15:13:56 -07:00
2021-07-29 15:06:49 +01:00
2021-08-31 16:43:06 -07:00