]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit - block/ioprio.c
block: Fix sys_ioprio_set(.which=IOPRIO_WHO_PGRP) task iteration
authorPeter Zijlstra <peterz@infradead.org>
Thu, 8 Apr 2021 09:46:12 +0000 (11:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Apr 2021 19:43:53 +0000 (13:43 -0600)
commit40c7fd3fdfba97a18724a0b96d132335fd419e98
treec7e5ed9dc17a58d49a9f5444c58bd311765d8a40
parent3212135a718b06be38811f2d9a320ae842e76409
block: Fix sys_ioprio_set(.which=IOPRIO_WHO_PGRP) task iteration

do_each_pid_thread() { } while_each_pid_thread() is a double loop and
thus break doesn't work as expected. Also, it should be used under
tasklist_lock because otherwise we can race against change_pid() for
PGID/SID.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/YG7Q5C4Rb5dx5GFx@hirez.programming.kicks-ass.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/ioprio.c