[PATCH] procfs: Fix a locking bug in a vmcore_add_device_dump() error path
David Hildenbrand
david at redhat.com
Thu Jan 30 02:02:42 PST 2025
On 29.01.25 23:20, Bart Van Assche wrote:
> Unlock vmcore_mutex when returning -EBUSY.
>
> Cc: David Hildenbrand <david at redhat.com>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: Michael S. Tsirkin <mst at redhat.com>
> Fixes: 0f3b1c40c652 ("fs/proc/vmcore: disallow vmcore modifications while the vmcore is open")
> Signed-off-by: Bart Van Assche <bvanassche at acm.org>
> ---
> fs/proc/vmcore.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
> index a00120a3c099..10d01eb09c43 100644
> --- a/fs/proc/vmcore.c
> +++ b/fs/proc/vmcore.cfs/proc/vmcore.c
> @@ -1524,7 +1524,7 @@ int vmcore_add_device_dump(struct vmcoredd_data *data)
> pr_warn_once("Unexpected adding of device dump\n");
> if (vmcore_open) {
> ret = -EBUSY;
> - goto out_err;
> + goto unlock;
Thanks!
Acked-by: David Hildenbrand <david at redhat.com>
--
Cheers,
David / dhildenb
More information about the kexec
mailing list