]> git.itanic.dy.fi Git - linux-stable/commit
io_uring: clear opcode specific data for an early failure
authorJens Axboe <axboe@kernel.dk>
Sat, 16 Mar 2024 15:51:40 +0000 (09:51 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 11:10:10 +0000 (13:10 +0200)
commitcb1cd176e0b431644653a7fa8691a1aaf7be98da
treeb8b26484404bd5ae37970db5a7d10f4ddce31bff
parentc818cb6171787bffad79f5f52f938997d8933793
io_uring: clear opcode specific data for an early failure

[ Upstream commit e21e1c45e1fe2e31732f40256b49c04e76a17cee ]

If failure happens before the opcode prep handler is called, ensure that
we clear the opcode specific area of the request, which holds data
specific to that request type. This prevents errors where opcode
handlers either don't get to clear per-request private data since prep
isn't even called.

Reported-and-tested-by: syzbot+f8e9a371388aa62ecab4@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/io_uring.c