summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-08-30 11:55:22 -0600
committerJens Axboe <axboe@kernel.dk>2021-08-31 11:45:27 -0600
commit94ffb0a282872c2f4b14f757fa1aef2302aeaabb (patch)
tree5d8cdeace9484d67ad0270f97d5e88244a052148 /usr
parent87df7fb922d18e96992aa5e824aa34b2065fef59 (diff)
downloadlinux-94ffb0a282872c2f4b14f757fa1aef2302aeaabb.tar.gz
linux-94ffb0a282872c2f4b14f757fa1aef2302aeaabb.tar.bz2
linux-94ffb0a282872c2f4b14f757fa1aef2302aeaabb.zip
io-wq: fix race between adding work and activating a free worker
The attempt to find and activate a free worker for new work is currently combined with creating a new one if we don't find one, but that opens io-wq up to a race where the worker that is found and activated can put itself to sleep without knowing that it has been selected to perform this new work. Fix this by moving the activation into where we add the new work item, then we can retain it within the wqe->lock scope and elimiate the race with the worker itself checking inside the lock, but sleeping outside of it. Cc: stable@vger.kernel.org Reported-by: Andres Freund <andres@anarazel.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions