diff options
author | 2019-11-13 09:43:34 -0700 | |
---|---|---|
committer | 2019-11-13 13:51:54 -0700 | |
commit | 36c2f9223e84c1aa84bfba90cb2e74b517c92a54 (patch) | |
tree | acb3bcd8f5cb61020c13a32c6ef7cacea84dd167 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | io_wq: add get/put_work handlers to io_wq_create() (diff) | |
download | linux-rng-36c2f9223e84c1aa84bfba90cb2e74b517c92a54.tar.xz linux-rng-36c2f9223e84c1aa84bfba90cb2e74b517c92a54.zip |
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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions