summaryrefslogtreecommitdiff
path: root/net/key/af_key.c
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2022-05-23 13:50:56 +0800
committerDavid S. Miller <davem@davemloft.net>2022-05-23 10:08:33 +0100
commit8c3b8dc5cc9bf6d273ebe18b16e2d6882bcfb36d (patch)
tree55c13be43e0d6a09c50090d516f251f99cdbbfa6 /net/key/af_key.c
parent75c1edf23b95a9c66923d9269d8e86e4dbde151f (diff)
net/smc: fix listen processing for SMC-Rv2
In the process of checking whether RDMAv2 is available, the current implementation first sets ini->smcrv2.ib_dev_v2, and then allocates smc buf desc, but the latter may fail. Unfortunately, the caller will only check the former. In this case, a NULL pointer reference will occur in smc_clc_send_confirm_accept() when accessing conn->rmb_desc. This patch does two things: 1. Use the return code to determine whether V2 is available. 2. If the return code is NODEV, continue to check whether V1 is available. Fixes: e49300a6bf62 ("net/smc: add listen processing for SMC-Rv2") Signed-off-by: liuyacan <liuyacan@corp.netease.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key/af_key.c')
0 files changed, 0 insertions, 0 deletions