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: <CAGxU2F6+m4pa7gzqvFL1OGLCc8sFDjRwhXZruFi41PQMs-XRew@mail.gmail.com>
Date:   Mon, 21 Feb 2022 12:49:45 +0100
From:   Stefano Garzarella <sgarzare@...hat.com>
To:     Jens Axboe <axboe@...nel.dk>,
        Pavel Begunkov <asml.silence@...il.com>
Cc:     kernel list <linux-kernel@...r.kernel.org>,
        linux-block@...r.kernel.org
Subject: Re: [PATCH] block: clear iocb->private in blkdev_bio_end_io_async()

Gentle ping :-)


On Fri, Feb 11, 2022 at 10:01 AM Stefano Garzarella <sgarzare@...hat.com> wrote:
>
> iocb_bio_iopoll() expects iocb->private to be cleared before
> releasing the bio.
>
> We already do this in blkdev_bio_end_io(), but we forgot in the
> recently added blkdev_bio_end_io_async().
>
> Fixes: 54a88eb838d3 ("block: add single bio async direct IO helper")
> Cc: asml.silence@...il.com
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
> ---
> I haven't seen a failure, I was just reading the code to understand iopoll,
> so IIUC we should clean iocb->private in blkdev_bio_end_io_async().
>
> Thanks,
> Stefano
> ---
>  block/fops.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/block/fops.c b/block/fops.c
> index 4f59e0f5bf30..a18e7fbd97b8 100644
> --- a/block/fops.c
> +++ b/block/fops.c
> @@ -289,6 +289,8 @@ static void blkdev_bio_end_io_async(struct bio *bio)
>         struct kiocb *iocb = dio->iocb;
>         ssize_t ret;
>
> +       WRITE_ONCE(iocb->private, NULL);
> +
>         if (likely(!bio->bi_status)) {
>                 ret = dio->size;
>                 iocb->ki_pos += ret;
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ