lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHc6FU71+Y2CT=04cbgtxp5p8jPYU5RK0tcz8wR4jyLdQw6h4A@mail.gmail.com>
Date:   Mon, 3 Jul 2023 22:31:34 +0200
From:   Andreas Gruenbacher <agruenba@...hat.com>
To:     Li Dong <lidong@...o.com>
Cc:     Bob Peterson <rpeterso@...hat.com>,
        "open list:GFS2 FILE SYSTEM" <cluster-devel@...hat.com>,
        open list <linux-kernel@...r.kernel.org>,
        opensource.kernel@...o.com
Subject: Re: [PATCH] fs: Fix bug in gfs2_freeze_func that can cause deadlock

Li Dong,

On Tue, Jun 20, 2023 at 5:47 AM Li Dong <lidong@...o.com> wrote:
> Function gfs2_freeze_func causes a deadlock,because sd_freeze_mutex was
> not released when return
>
> Signed-off-by: Li Dong <lidong@...o.com>
> ---
>  fs/gfs2/super.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
> --- a/fs/gfs2/super.c
> +++ b/fs/gfs2/super.c
> @@ -741,8 +741,10 @@ void gfs2_freeze_func(struct work_struct *work)
>         set_bit(SDF_FROZEN, &sdp->sd_flags);
>
>         error = gfs2_do_thaw(sdp);
> -       if (error)
> +       if (error) {
> +               mutex_unlock(&sdp->sd_freeze_mutex);
>                 goto out;
> +       }

thank you for this bug report. I have chosen to fold this fix into
commit "gfs2: Rework freeze / thaw logic" and clean up
gfs2_freeze_func() a little along the way; see the current for-next
branch.

Thanks,
Andreas

>         clear_bit(SDF_FROZEN, &sdp->sd_flags);
>
> --
> 2.31.1.windows.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ