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: 60cf46ae60
("io-wq: hash dependent work")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
f2cf11492b
commit
18a542ff19
@@ -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;
|
||||
|
Reference in New Issue
Block a user