Whamcloud - gitweb
LU-16604 kfilnd: kfilnd_peer ref leak on send 57/50157/2
authorChris Horn <chris.horn@hpe.com>
Tue, 28 Feb 2023 20:09:57 +0000 (13:09 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Mar 2023 22:12:19 +0000 (22:12 +0000)
commit73ee638813a8b3663a35a4dec119164f6eb30b34
tree479e0b6fa58e41994403551ec881cadee23183ce
parent6fab1fe4a5c5615d4d8f74832c9c5984625b8668
LU-16604 kfilnd: kfilnd_peer ref leak on send

There is an extra refcount_inc() done by kfilnd_tn_alloc_for_peer().
This is correct in the case where we are allocating TN for HELLO
request, because our caller does not take extra ref on kfilnd_peer,
but it is wrong in the normal kfilnd_tn_alloc() path because
kfilnd_tn_alloc() takes this reference by way of a call to
kfilnd_peer_get().

Move the refcount_inc() from kfilnd_tn_alloc_for_peer() to
kfilnd_send_hello_request() where it is needed.

Test-Parameters: trivial
HPE-bug-id: LUS-11128
Fixes: 11a32d886b ("LU-16213 kfilnd: Allow one HELLO in-flight per peer")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I3d723a829ec42929ce22a80ffda97dbd87917d4b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50157
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Ron Gredvig <ron.gredvig@hpe.com>
Reviewed-by: Ian Ziemba <ian.ziemba@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/kfilnd/kfilnd.c
lnet/klnds/kfilnd/kfilnd_tn.c