Commit 323b190
committed
io_uring: free iovec if file assignment fails
We just return failure in this case, but we need to release the iovec
first. If we're doing IO with more than FAST_IOV segments, then the
iovec is allocated and must be freed.
Reported-by: syzbot+96b43810dfe9c3bb95ed@syzkaller.appspotmail.com
Fixes: 584b018 ("io_uring: move read/write file prep state into actual opcode handler")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 7015214 commit 323b190
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3832 | 3832 | | |
3833 | 3833 | | |
3834 | 3834 | | |
3835 | | - | |
| 3835 | + | |
| 3836 | + | |
3836 | 3837 | | |
| 3838 | + | |
3837 | 3839 | | |
3838 | 3840 | | |
3839 | 3841 | | |
| |||
3958 | 3960 | | |
3959 | 3961 | | |
3960 | 3962 | | |
3961 | | - | |
| 3963 | + | |
| 3964 | + | |
3962 | 3965 | | |
| 3966 | + | |
3963 | 3967 | | |
3964 | 3968 | | |
3965 | 3969 | | |
| |||
0 commit comments