diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2019-10-25 12:31:29 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-10-25 09:01:58 -0600 |
commit | 84d55dc5b9e57b513a702fbc358e1b5489651590 (patch) | |
tree | de890f651c619be7d4144035f22fa8928b3df80c | |
parent | a1f58ba46f794b1168d1107befcf3d4b9f9fd453 (diff) |
io_uring: Fix corrupted user_data
There is a bug, where failed linked requests are returned not with
specified @user_data, but with garbage from a kernel stack.
The reason is that io_fail_links() uses req->user_data, which is
uninitialised when called from io_queue_sqe() on fail path.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 1b46c72f8975..0e141d905a5b 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2448,6 +2448,8 @@ err: return; } + req->user_data = s->sqe->user_data; + /* * If we already have a head request, queue this one for async * submittal once the head completes. If we don't have a head but |