https://github.com/torvalds/linux
Revision 09ca6c40c2024211657fdb2c50522a355610c3b7 authored by Jens Axboe on 05 March 2021, 15:14:08 UTC, committed by Jens Axboe on 05 March 2021, 15:44:09 UTC
If we race with shutting down the io-wq context and someone queueing
a hashed entry, then we can exit the manager with it armed. If it then
triggers after the manager has exited, we can have a use-after-free where
io_wqe_hash_wake() attempts to wake a now gone manager process.

Move the killing of the hashed write queue into the manager itself, so
that we know we've killed it before the task exits.

Fixes: e941894eae31 ("io-wq: make buffered file write hashed work map per-ctx")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b5b0ecb
History
Tip revision: 09ca6c40c2024211657fdb2c50522a355610c3b7 authored by Jens Axboe on 05 March 2021, 15:14:08 UTC
io-wq: kill hashed waitqueue before manager exits
Tip revision: 09ca6c4
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.4 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.9 KB
.mailmap -rw-r--r-- 18.5 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 98.3 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 577.0 KB
Makefile -rw-r--r-- 64.6 KB
README -rw-r--r-- 727 bytes

README

back to top