* [merged mm-hotfixes-stable] procfs-fix-a-locking-bug-in-a-vmcore_add_device_dump-error-path.patch removed from -mm tree
@ 2025-02-18 6:40 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-02-18 6:40 UTC (permalink / raw)
To: mm-commits, mst, david, bhe, bvanassche, akpm
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 <bvanassche@acm.org>
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.
Link: https://lkml.kernel.org/r/20250129222003.1495713-1-bvanassche@acm.org
Fixes: 0f3b1c40c652 ("fs/proc/vmcore: disallow vmcore modifications while the vmcore is open")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Baoquan he <bhe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/proc/vmcore.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/fs/proc/vmcore.c~procfs-fix-a-locking-bug-in-a-vmcore_add_device_dump-error-path
+++ a/fs/proc/vmcore.c
@@ -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 bvanassche@acm.org are
mm-vmstat-revert-fix-a-w=1-clang-compiler-warning.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-18 6:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-18 6:40 [merged mm-hotfixes-stable] procfs-fix-a-locking-bug-in-a-vmcore_add_device_dump-error-path.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.