io_uring/sqpoll: annotate debug task == current with data_race()
Jens Axboe
maintainerPATCH 1/1 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 [email protected]
Signed-off-by Jens Axboe <[email protected]>
---
io_uring/sqpoll.c +1 -1
@@ -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);
Signature · 1 line
Jens Axboe