[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [PATCH] dlm close othercons



Fabio M. Di Nitto wrote:
> On Wed, 9 Jan 2008, Patrick Caulfeld wrote:
> 
>> This patch addresses a problem introduced with the last round of
>> lowcomms patches where the 'othercon' connections do not get freed when
>> the DLM shuts down.
>>
>> This results in the error message
>> "slab error in kmem_cache_destroy(): cache `dlm_conn': Can't free all
>> objects"
>>
>> and the DLM cannot be restarted without a system reboot.
>>
>> See bz#428119
>>
>> Signed-Off-By: Patrick Caulfield <pcaulfie redhat com>
>>
> 
> http://git.kernel.org/?p=linux/kernel/git/steve/gfs2-2.6-nmw.git;a=commitdiff;h=89f0bb2873fcaa8e57831dd3f0c013cabbd99012
> 
> 
> this doesn't look right...
> 
> shouldn't we free the con->other _before_ we free con?
> 
> That's what we were doing before applying all that patch set that
> removed the original kmem_cache_free...
> 


ARGH! you're right, of course. Patch to fix is attached.

Thanks Fabio, I'm glad that someone reads my patches ... I just wish it
had been me ;-)

Patrick

Signed-off-by: Patrick Caulfield <pcaulfie redhat com>
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 4cc6cfb..b1cb855 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1437,9 +1437,9 @@ void dlm_lowcomms_stop(void)
 		con = __nodeid2con(i, 0);
 		if (con) {
 			close_connection(con, true);
-			kmem_cache_free(con_cache, con);
 			if (con->othercon)
 				kmem_cache_free(con_cache, con->othercon);
+			kmem_cache_free(con_cache, con);
 		}
 	}
 	max_nodeid = 0;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]