The logic of the original commit 4d99b2581eff ("staging: lustre: avoid
intensive reconnecting for ko2iblnd")
was assumed conditional free of struct kib_conn if the second argument
free_conn in function
kiblnd_destroy_conn(struct kib_conn *conn, bool free_conn) is true. But this
hunk of code was
In the original commit 4d99b2581effe115376402e710fbcb1c3c073769
was missed one hunk. Added it now to avoid issue with use after free.
Signed-off-by: Dmitry Eremin
---
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers
Hello Dan,
It looks this condition is missed in the code. Sorry we should fix this.
Dmitry.
> -Original Message-
> From: Eremin, Dmitry
> Sent: Monday, January 15, 2018 9:27 PM
> To: Dan Carpenter ; ne...@suse.com
> Cc: de...@driverdev.osuosl.org; lustre-de...@lists.lustr
Hello Dan,
The function kiblnd_destroy_conn() is conditionally free the conn pointer.
void kiblnd_destroy_conn(kib_conn_t *conn, bool free_conn)
{
[…]
if (free_conn)
LIBCFS_FREE(conn, sizeof(*conn));
}
Therefore
> 3317 kib
%u\n",
- imp->imp_connection == NULL ? "" : nidstr,
+ nidstr,
imp->imp_conn_cnt,
imp->imp_generation,
atomic_read(&imp->imp_inval_count));
Dmitry.
> -----Origin