Commit 2d9e350d authored by Al Viro's avatar Al Viro Committed by Xie XiuQi
Browse files

aio_poll_wake(): don't set ->woken if we ignore the wakeup

euler inclusion
category: bugfix
bugzilla: 10679
CVE: NA

---------------------------

In case of early wakeups, aio_poll() assumes that aio_poll_complete()
has either already happened or is imminent.  In that case we do not
want to put iocb on the list of cancellables.  However, ignored
wakeups need to be treated as if wakeup has not happened at all.
Trivially fixed by having aio_poll_wake() set ->woken only after
it's committed to taking iocb out of the waitqueue.

Link: https://patchwork.kernel.org/patch/10842107/


Suggested-by: default avatarzhengbin <zhengbin13@huawei.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarzhengbin <zhengbin13@huawei.com>
Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 9b15cfc8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment