Skip to contentSkip to conversation

procfs-fix-a-locking-bug-in-a-vmcore_add_device_dump-error-path.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Feb 18, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: procfs: fix a locking bug in a vmcore_add_device_dump() error path
has been removed from the -mm tree. Its filename was
procfs-fix-a-locking-bug-in-a-vmcore_add_device_dump-error-path.patch

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

------------------------------------------------------
From: Bart Van Assche <[email protected]>
Subject: procfs: fix a locking bug in a vmcore_add_device_dump() error path
Date: Wed, 29 Jan 2025 14:20:03 -0800

Unlock vmcore_mutex when returning -EBUSY.

Fixes 0f3b1c40c652 ("fs/proc/vmcore: disallow vmcore modifications while the vmcore is open")
Cc Baoquan he <[email protected]>

---

 fs/proc/vmcore.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/proc/vmcore.c renamed from fs/proc/vmcore.c~procfs-fix-a-locking-bug-in-a-vmcore_add_device_dump-error-path +4 -1
@@ -1524,7 +1524,7 @@ int vmcore_add_device_dump(struct vmcore
 		pr_warn_once("Unexpected adding of device dump\n");
 	if (vmcore_open) {
 		ret = -EBUSY;
-		goto out_err;
+		goto unlock;
 	}
 
 	list_add_tail(&dump->list, &vmcoredd_list);
@@ -1532,6 +1532,9 @@ int vmcore_add_device_dump(struct vmcore
 	mutex_unlock(&vmcore_mutex);
 	return 0;
 
+unlock:
+	mutex_unlock(&vmcore_mutex);
+
 out_err:
 	vfree(buf);
 	vfree(dump);

_

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

mm-vmstat-revert-fix-a-w=1-clang-compiler-warning.patch