aio_poll(): sanitize the logics after vfs_poll(), get rid of leak on error
euler inclusion category: bugfix bugzilla: 10679 CVE: NA --------------------------- We want iocb_put() happening on errors, to balance the extra reference we'd taken. As it is, we end up with a leak. The rules should be * error: iocb_put() to deal with the extra ref, return error, let the caller do another iocb_put(). * async: iocb_put() to deal with the extra ref, return 0. * no error, event present immediately: aio_poll_complete() to report it, iocb_put() to deal with the extra ref, return 0. Link: https://patchwork.kernel.org/patch/10842103/ Signed-off-by:Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
zhengbin <zhengbin13@huawei.com> Reviewed-by:
zhangyi (F) <yi.zhang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Please register or sign in to comment