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@xxxxxxx> 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@xxxxxxx Fixes: 0f3b1c40c652 ("fs/proc/vmcore: disallow vmcore modifications while the vmcore is open") Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx> Acked-by: David Hildenbrand <david@xxxxxxxxxx> Cc: Baoquan he <bhe@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxx are mm-vmstat-revert-fix-a-w=1-clang-compiler-warning.patch