]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: io_allocate_scq_urings() should return a sane state
authorJens Axboe <axboe@kernel.dk>
Wed, 20 Nov 2019 16:26:29 +0000 (09:26 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Nov 2019 02:56:06 +0000 (19:56 -0700)
commit6ca40920dbc7139e58450f5935b2a5306ad34390
treedaa735914c94651012eaf4ef7776d23e2417fc5c
parent7545c93593e4c743a7553d6a7ed05e052ed7c537
io_uring: io_allocate_scq_urings() should return a sane state

We currently rely on the ring destroy on cleaning things up in case of
failure, but io_allocate_scq_urings() can leave things half initialized
if only parts of it fails.

Be nice and return with either everything setup in success, or return an
error with things nicely cleaned up.

Reported-by: syzbot+0d818c0d39399188f393@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c