]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix error in handling dead task for ioprio setting
authorJens Axboe <axboe@kernel.dk>
Tue, 21 Dec 2021 03:32:24 +0000 (20:32 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Dec 2021 03:32:24 +0000 (20:32 -0700)
commit0031240521303bfe997f04fe694f827f1d716ee6
treea3987037f0103e3bf5118ec1845815b2810a1ced
parent833da6ba48f97a2ad177b36feee4e69306203629
block: fix error in handling dead task for ioprio setting

Don't combine the task exiting and "already have io_context" case, we
need to just abort if the task is marked as dead. Return -ESRCH, which
is the documented value for ioprio_set() if the specified task could not
be found.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: syzbot+8836466a79f4175961b0@syzkaller.appspotmail.com
Fixes: a9eeb3863008 ("block: open code create_task_io_context in set_task_ioprio")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-ioc.c