diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-08-13 06:10:59 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-08-13 06:10:59 -0600 |
commit | e4956dc7a84da074fd8dc10f7abd147f15b3ae58 (patch) | |
tree | f4251e7f5e8f5d12efcdd93d0e0994b48bb17150 /io_uring | |
parent | 48cc7ecd3a68e0fbfa281ef1ed6f6b6cb7638390 (diff) | |
download | linux-stable-e4956dc7a84da074fd8dc10f7abd147f15b3ae58.tar.gz linux-stable-e4956dc7a84da074fd8dc10f7abd147f15b3ae58.tar.bz2 linux-stable-e4956dc7a84da074fd8dc10f7abd147f15b3ae58.zip |
io_uring/sqpoll: annotate debug task == current with data_race()
There's a debug check in io_sq_thread_park() checking if it's the SQPOLL
thread itself calling park. KCSAN warns about this, as we should not be
reading sqd->thread outside of sqd->lock.
Just silence this with data_race(). The pointer isn't used for anything
but this debug check.
Reported-by: syzbot+2b946a3fd80caf971b21@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/sqpoll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c index b3722e5275e7..3b50dc9586d1 100644 --- a/io_uring/sqpoll.c +++ b/io_uring/sqpoll.c @@ -44,7 +44,7 @@ void io_sq_thread_unpark(struct io_sq_data *sqd) void io_sq_thread_park(struct io_sq_data *sqd) __acquires(&sqd->lock) { - WARN_ON_ONCE(sqd->thread == current); + WARN_ON_ONCE(data_race(sqd->thread) == current); atomic_inc(&sqd->park_pending); set_bit(IO_SQ_THREAD_SHOULD_PARK, &sqd->state); |