https://github.com/torvalds/linux
Revision a8d13dbccb137c46fead2ec1a4f1fbc8cfc9ea91 authored by Jens Axboe on 15 January 2021, 23:04:23 UTC, committed by Jens Axboe on 15 January 2021, 23:04:23 UTC
If we enter with requests pending and performm cancelations, we'll have
a different inflight count before and after calling prepare_to_wait().
This causes the loop to restart. If we actually ended up canceling
everything, or everything completed in-between, then we'll break out
of the loop without calling finish_wait() on the waitqueue. This can
trigger a warning on exit_signals(), as we leave the task state in
TASK_UNINTERRUPTIBLE.

Put a finish_wait() after the loop to catch that case.

Cc: stable@vger.kernel.org # 5.9+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f010505
History
Tip revision: a8d13dbccb137c46fead2ec1a4f1fbc8cfc9ea91 authored by Jens Axboe on 15 January 2021, 23:04:23 UTC
io_uring: ensure finish_wait() is always called in __io_uring_task_cancel()
Tip revision: a8d13db
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.3 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.8 KB
.mailmap -rw-r--r-- 17.9 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 97.9 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 572.1 KB
Makefile -rw-r--r-- 62.9 KB
README -rw-r--r-- 727 bytes

README

back to top