Whamcloud - gitweb
LU-17760 lnet: Crash caused by uninitialized interface name 59/54859/13
authorFrank Sehr <fsehr@whamcloud.com>
Fri, 19 Apr 2024 22:33:12 +0000 (18:33 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Jul 2024 04:40:58 +0000 (04:40 +0000)
commit2718f8a4526382e6369ef63acf6df57c942f834e
tree7ea0b416ffa08cf6efb340c7001d8ea51c881432
parent42cdcdb48b43c06b31edb2381630ee4d703bc77b
LU-17760 lnet: Crash caused by uninitialized interface name

When adding an interface with ip2net, a duplicate configuration of an
already existing interface can cause a crash or misconfiguration of
lnet. Incoming interface names have to be checked if they are null and
furthermore duplicate interface configurations have to be removed.
When a duplicate is detected add has to be added to a list to be able
to shut it down otherwise shutdown would assert.
The problem can be repoduced on tcp and o2ib networks.
Steps that were used to reproduce the problem in the original
configuration, but it is reproducable in other variations and
in tcp networks.
modprobe lnet
lnetctl lnet configure
lnetctl net add --net  o2ib --if mlxib1
lnetctl net add --net  o2ib --if mlxib1
       --ip2net "o2ib 172.30.12.*"

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Frank Sehr <fsehr@whamcloud.com>
Change-Id: Ie76d97cc52855ab897a9e07a3697483189d4b19e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54859
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c
lustre/tests/sanity-lnet.sh