diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2021-12-10 21:20:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-14 12:57:16 +0300 |
commit | d429b302c184a0018cadce49a50e099ffaf1dcb7 (patch) | |
tree | f0aa50abdd135330343218d63258b5872961f4f7 /drivers/scsi | |
parent | e3098ce15fece36ded5e0d298568209e38dbb014 (diff) | |
download | linux-d429b302c184a0018cadce49a50e099ffaf1dcb7.tar.xz |
block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2)
commit e6a59aac8a8713f335a37d762db0dbe80e7f6d38 upstream.
do_each_pid_thread(PIDTYPE_PGID) can race with a concurrent
change_pid(PIDTYPE_PGID) that can move the task from one hlist
to another while iterating. Serialize ioprio_get to take
the tasklist_lock in this case, just like it's set counterpart.
Fixes: d69b78ba1de (ioprio: grab rcu_read_lock in sys_ioprio_{set,get}())
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Link: https://lore.kernel.org/r/20211210182058.43417-1-dave@stgolabs.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi')
0 files changed, 0 insertions, 0 deletions