[PATCH] staging: lustre: Fix avoid intensive reconnecting for ko2iblnd patch

2018-01-16 Thread Eremin, Dmitry
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

[PATCH] staging: lustre: Fix avoid intensive reconnecting for ko2iblnd patch

2018-01-16 Thread Eremin, Dmitry
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

RE: [lustre-devel] [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-15 Thread Eremin, Dmitry
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

RE: [lustre-devel] [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-15 Thread Eremin, Dmitry
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

RE: staging: lustre: provide separate buffers for libcfs_*2str()

2015-11-04 Thread Eremin, Dmitry
%u\n", - imp->imp_connection == NULL ? "" : nidstr, + nidstr, imp->imp_conn_cnt, imp->imp_generation, atomic_read(&imp->imp_inval_count)); Dmitry. > -----Origin