io_uring: fix uninitialized field in rw io_kiocb
authorJoseph Ravichandran <jravi@mit.edu>
Thu, 28 Apr 2022 16:57:52 +0000 (12:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:16:26 +0000 (09:16 +0200)
commit77089e6ff273f43c42e99a690ae45ee39a6a62de
tree8f7b4fbb74993957b7e31eb362bae68bf64a4d92
parent254ca186d553beb9bf0762cbb5cc604c24d44760
io_uring: fix uninitialized field in rw io_kiocb

[ Upstream commit 32452a3eb8b64e01e2be717f518c0be046975b9d ]

io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll
reads kiocb->private it can contain uninitialized data.

Fixes: 3e08773c3841 ("block: switch polling to be bio based")
Signed-off-by: Joseph Ravichandran <jravi@mit.edu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c