cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed
@ 2007-08-14  9:47 swhiteho
  2007-08-14  9:47 ` [Cluster-devel] [PATCH] [DLM] fix NULL ls usage swhiteho
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: swhiteho @ 2007-08-14  9:47 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Patrick Caulfield <pcaulfie@redhat.com>

This patch clears the othercon pointer and frees the memory when a connnection
is closed. This could cause a small memory leak when nodes leave the cluster.

Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index dd36273..d15fd5f 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -327,6 +327,8 @@ static void close_connection(struct connection *con, bool and_other)
 	if (con->othercon && and_other) {
 		/* Will only re-enter once. */
 		close_connection(con->othercon, false);
+		kmem_cache_free(con_cache, con->othercon);
+		con->othercon = NULL;
 	}
 	if (con->rx_page) {
 		__free_page(con->rx_page);
-- 
1.5.1.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [Cluster-devel] [PATCH] dlm: fix NULL ls usage
@ 2007-07-13 19:49 David Teigland
  0 siblings, 0 replies; 15+ messages in thread
From: David Teigland @ 2007-07-13 19:49 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Fix regression in recent patch "[DLM] variable allocation" which
attempts to dereference an "ls" struct when it's NULL.

Signed-off-by: David Teigland <teigland@redhat.com>

Index: linux-quilt/fs/dlm/rcom.c
===================================================================
--- linux-quilt.orig/fs/dlm/rcom.c	2007-06-06 08:48:33.000000000 -0500
+++ linux-quilt/fs/dlm/rcom.c	2007-07-13 14:42:19.000000000 -0500
@@ -386,8 +386,7 @@
 	dlm_recover_process_copy(ls, rc_in);
 }
 
-static int send_ls_not_ready(struct dlm_ls *ls, int nodeid,
-			     struct dlm_rcom *rc_in)
+static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
 {
 	struct dlm_rcom *rc;
 	struct rcom_config *rf;
@@ -395,7 +394,7 @@
 	char *mb;
 	int mb_len = sizeof(struct dlm_rcom) + sizeof(struct rcom_config);
 
-	mh = dlm_lowcomms_get_buffer(nodeid, mb_len, ls->ls_allocation, &mb);
+	mh = dlm_lowcomms_get_buffer(nodeid, mb_len, GFP_NOFS, &mb);
 	if (!mh)
 		return -ENOBUFS;
 	memset(mb, 0, mb_len);
@@ -465,7 +464,7 @@
 		log_print("lockspace %x from %d type %x not found",
 			  hd->h_lockspace, nodeid, rc->rc_type);
 		if (rc->rc_type == DLM_RCOM_STATUS)
-			send_ls_not_ready(ls, nodeid, rc);
+			send_ls_not_ready(nodeid, rc);
 		return;
 	}
 



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-08-14 16:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-14  9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [DLM] fix NULL ls usage swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [DLM] zero unused parts of sockaddr_storage swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [DLM] More othercon fixes swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [DLM] fix basts for granted PR waiting CW swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup detected in databuf_lo_before_commit swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [GFS2] soft lockup in rgblk_search swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect return code in rgrp.c swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix incorrect error path in prepare_write() swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [GFS2] Fix setting of inherit jdata attr swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [GFS2] Revert remounting w/o acl option leaves acls enabled swhiteho
2007-08-14 10:08 ` [Cluster-devel] [GFS2/DLM] [0/12] Pre pull request patch posting Steven Whitehouse
2007-08-14 16:44   ` [Cluster-devel] [GFS2/DLM] Pull request Steven Whitehouse
  -- strict thread matches above, loose matches on Subject: below --
2007-07-13 19:49 [Cluster-devel] [PATCH] dlm: fix NULL ls usage David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).