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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegttTpU0=yF_7QNx_PCOELetG0eGoEtmRyv0m4czK9EGNQ@mail.gmail.com>
Date:   Wed, 7 Nov 2018 14:16:30 +0100
From:   Miklos Szeredi <miklos@...redi.hu>
To:     Kirill Tkhai <ktkhai@...tuozzo.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] fuse: Check for FR_SENT bit in fuse_dev_do_write()

On Tue, Nov 6, 2018 at 10:30 AM, Kirill Tkhai <ktkhai@...tuozzo.com> wrote:
> It's not possible to have answer to a request,
> before the request is actually sent. Add sanity
> check for that.

It's checking for the impossible.  That sometimes makes sense as a
WARN_ON() or in special cases a BUG_ON().


>
> Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>
> ---
>  fs/fuse/dev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index 739968ee8b0c..c603f1ebf0fd 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -1947,7 +1947,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
>                 goto err_unlock_pq;
>
>         req = request_find(fpq, oh.unique & ~FUSE_INT_REQ_BIT);
> -       if (!req)
> +       if (!req || !test_bit(FR_SENT, &req->flags))
>                 goto err_unlock_pq;
>
>         /* Is it an interrupt reply ID? */
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ