summary refs log tree commit diff
path: root/drivers
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-11-13 09:43:34 -0700
committerJens Axboe <axboe@kernel.dk>2019-11-13 13:51:54 -0700
commit36c2f9223e84c1aa84bfba90cb2e74b517c92a54 (patch)
treeacb3bcd8f5cb61020c13a32c6ef7cacea84dd167 /drivers
parent7d7230652e7c788ef908536fd79f4cca077f269f (diff)
downloadlinux-36c2f9223e84c1aa84bfba90cb2e74b517c92a54.tar.gz
io-wq: ensure we have a stable view of ->cur_work for cancellations
worker->cur_work is currently protected by the lock of the wqe that the
worker belongs to. When we send a signal to a worker, we need a stable
view of ->cur_work, so we need to hold that lock. But this doesn't work
so well, since we have the opposite order potentially on queueing work.
If POLL_ADD is used with a signalfd, then io_poll_wake() is called with
the signal lock, and that sometimes needs to insert work items.

Add a specific worker lock that protects the current work item. Then we
can guarantee that the task we're sending a signal is currently
processing the exact work we think it is.

Reported-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions