Skip to contentSkip to conversation

ocfs2-fix-double-free-in-user_cluster_connect.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Sep 28, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: ocfs2: fix double free in user_cluster_connect()
has been removed from the -mm tree. Its filename was
ocfs2-fix-double-free-in-user_cluster_connect.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Dan Carpenter <[email protected]>
Subject: ocfs2: fix double free in user_cluster_connect()
Date: Tue, 23 Sep 2025 14:26:07 +0300

user_cluster_disconnect() frees "conn->cc_private" which is "lc" but then the error handling frees "lc" a second time. Set "lc" to NULL on this path to avoid a double free.

Fixes c994c2ebdbbc ("ocfs2: use the new DLM operation callbacks while requesting new lockspace")
Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>
Cc Junxiao Bi <[email protected]>
Cc Changwei Ge <[email protected]>
Cc Jun Piao <[email protected]>

---

 fs/ocfs2/stack_user.c |    1 +
 1 file changed, 1 insertion(+)
fs/ocfs2/stack_user.c renamed from fs/ocfs2/stack_user.c~ocfs2-fix-double-free-in-user_cluster_connect +1 -0
@@ -1011,6 +1011,7 @@ static int user_cluster_connect(struct o
 			printk(KERN_ERR "ocfs2: Could not determine"
 					" locking version\n");
 			user_cluster_disconnect(conn);
+			lc = NULL;
 			goto out;
 		}
 		wait_event(lc->oc_wait, (atomic_read(&lc->oc_this_node) > 0));

_

Patches currently in -mm which might be from [email protected] are