summaryrefslogtreecommitdiff
path: root/fs/io-wq.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-03-23 00:23:29 +0300
committerJens Axboe <axboe@kernel.dk>2020-03-22 19:31:27 -0600
commit18a542ff19ad149fac9e5a36a4012e3cac7b3b3b (patch)
tree254619a183836e5b7b72493955bf39418228c3e6 /fs/io-wq.h
parentf2cf11492b8b30d89b2fbf525c9ea5e8c4ccc842 (diff)
downloadlinux-next-18a542ff19ad149fac9e5a36a4012e3cac7b3b3b.tar.gz
io_uring: Fix ->data corruption on re-enqueue
work->data and work->list are shared in union. io_wq_assign_next() sets ->data if a req having a linked_timeout, but then io-wq may want to use work->list, e.g. to do re-enqueue of a request, so corrupting ->data. ->data is not necessary, just remove it and extract linked_timeout through @link_list. Fixes: 60cf46ae6054 ("io-wq: hash dependent work") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.h')
-rw-r--r--fs/io-wq.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/io-wq.h b/fs/io-wq.h
index 298b21f4a4d2..d2a5684bf673 100644
--- a/fs/io-wq.h
+++ b/fs/io-wq.h
@@ -63,10 +63,7 @@ static inline void wq_node_del(struct io_wq_work_list *list,
} while (0)
struct io_wq_work {
- union {
- struct io_wq_work_node list;
- void *data;
- };
+ struct io_wq_work_node list;
void (*func)(struct io_wq_work **);
struct files_struct *files;
struct mm_struct *mm;