[Cluster-devel] [PATCH] dlm: fixed memory leaks after failed ls_remove_names allocation

2018-11-15 Thread Vasily Averin
If allocation fails on last elements of array need to free already allocated elements. Fixes 789924ba635f ("dlm: fix race between remove and lookup") Cc: sta...@kernel.org # 3.6 Signed-off-by: Vasily Averin --- fs/dlm/lockspace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[Cluster-devel] lost idr_destroy for ls_recover_idr in release_lockspace() ?

2018-11-15 Thread Vasily Averin
Dear David, I've noticed that release_lockspace() lacks idr_destroy(>ls_recover_idr), though it is called on rollback in new_lockspace(). It seems for me it is not critical, and should not lead to any leaks, however could you please re-check it? Thank you, Vasily Averin

[Cluster-devel] [PATCH 2/3] dlm: lost put_lkb on error path in receive_convert() and receive_unlock()

2018-11-15 Thread Vasily Averin
Fixes 6d40c4a708e0 ("dlm: improve error and debug messages") Cc: sta...@kernel.org # 3.5 Signed-off-by: Vasily Averin --- fs/dlm/lock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 2cb125cc21c9..03d767b94f7b 100644 --- a/fs/dlm/lock.c ++

[Cluster-devel] [PATCH 1/3] dlm: possible memory leak on error path in create_lkb()

2018-11-15 Thread Vasily Averin
Fixes 3d6aa675fff9 ("dlm: keep lkbs in idr") Cc: sta...@kernel.org # 3.1 Signed-off-by: Vasily Averin --- fs/dlm/lock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index cc91963683de..2cb125cc21c9 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c

[Cluster-devel] [PATCH 3/3] dlm: memory leaks on error path in dlm_user_request()

2018-11-15 Thread Vasily Averin
Signed-off-by: Vasily Averin --- fs/dlm/lock.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 03d767b94f7b..a928ba008d7d 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -5795,20 +5795,20 @@ int dlm_user_request(struct dlm_ls *

[Cluster-devel] [PATCH v2] dlm: fixed memory leaks after failed ls_remove_names allocation

2018-11-15 Thread Vasily Averin
If allocation fails on last elements of array need to free already allocated elements. v2: just move existing out_rsbtbl label to right place Fixes 789924ba635f ("dlm: fix race between remove and lookup") Cc: sta...@kernel.org # 3.6 Signed-off-by: Vasily Averin --- fs/dlm/locks