Skip to content

Commit

Permalink
aio: initialize kiocb private in case any filesystems expect it.
Browse files Browse the repository at this point in the history
commit ec51f8e upstream.

A recent optimization had left private uninitialized.

Fixes: 2bc4ca9 ("aio: don't zero entire aio_kiocb aio_get_req()")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
hubcapsc authored and gregkh committed May 2, 2019
1 parent a812f7b commit 2afa01c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,7 @@ static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb)
if (unlikely(!req->ki_filp))
return -EBADF;
req->ki_complete = aio_complete_rw;
req->private = NULL;
req->ki_pos = iocb->aio_offset;
req->ki_flags = iocb_flags(req->ki_filp);
if (iocb->aio_flags & IOCB_FLAG_RESFD)
Expand Down

0 comments on commit 2afa01c

Please sign in to comment.