diff options
author | 2022-03-02 21:25:11 +0800 | |
---|---|---|
committer | 2022-03-03 10:34:18 +0000 | |
commit | 0537f0a2151375dcf90c1bbfda6a0aaf57164e89 (patch) | |
tree | c0d3e478c5976f8bec5a201d1cbb30e5dfeb9bfb /lib/test_overflow.c | |
parent | net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe() (diff) | |
download | wireguard-linux-0537f0a2151375dcf90c1bbfda6a0aaf57164e89.tar.xz wireguard-linux-0537f0a2151375dcf90c1bbfda6a0aaf57164e89.zip |
net/smc: fix unexpected SMC_CLC_DECL_ERR_REGRMB error generated by client
The main reason for this unexpected SMC_CLC_DECL_ERR_REGRMB in client
dues to following execution sequence:
Server Conn A: Server Conn B: Client Conn B:
smc_lgr_unregister_conn
smc_lgr_register_conn
smc_clc_send_accept ->
smc_rtoken_add
smcr_buf_unuse
-> Client Conn A:
smc_rtoken_delete
smc_lgr_unregister_conn() makes current link available to assigned to new
incoming connection, while smcr_buf_unuse() has not executed yet, which
means that smc_rtoken_add may fail because of insufficient rtoken_entry,
reversing their execution order will avoid this problem.
Fixes: 3e034725c0d8 ("net/smc: common functions for RMBs and send buffers")
Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions