Whamcloud - gitweb
LU-17000 lnet: Fix dereference after NULL under ksocknal_recv_hello 05/53305/3
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Fri, 1 Dec 2023 04:58:32 +0000 (23:58 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 20 Dec 2023 01:58:39 +0000 (01:58 +0000)
commitc5685cc9a61e8cffdbb7e3e2a17a9b0bcf4a8a9b
tree6be5c251727059e8cf9a425ca3d81a0d9ca78f23
parentf76d6ecc788a522916469f202f2e7f0d7cee1b77
LU-17000 lnet: Fix dereference after NULL under ksocknal_recv_hello

This patch fixes 'conn->ksnc_proto' which was
dereferenced under function ksocknal_recv_hello()
even though it could be NULL.

This patch also removes 'returns' in between
the function and replaces it with 'goto'.
Allowing exit from a single place.

CoverityID: 410244 ("Dereference after null check")
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Fixes: cb5f92c0e (LU-10391 ksocklnd: use ksocknal_protocol v4 for IPv6)
Change-Id: I95196d481b537281ab8643f1ee6162db450bef20
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53305
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/socklnd/socklnd_cb.c