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: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: Nzhengbin <zhengbin13@huawei.com> Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录