From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/fs/aio.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/kernel/fs/aio.c b/kernel/fs/aio.c index 1a78979..5934ea8 100644 --- a/kernel/fs/aio.c +++ b/kernel/fs/aio.c @@ -43,6 +43,7 @@ #include <linux/mount.h> #include <linux/pseudo_fs.h> +#include <asm/kmap_types.h> #include <linux/uaccess.h> #include <linux/nospec.h> @@ -334,6 +335,9 @@ spin_lock(&mm->ioctx_lock); rcu_read_lock(); table = rcu_dereference(mm->ioctx_table); + if (!table) + goto out_unlock; + for (i = 0; i < table->nr; i++) { struct kioctx *ctx; @@ -347,6 +351,7 @@ } } +out_unlock: rcu_read_unlock(); spin_unlock(&mm->ioctx_lock); return res; @@ -1761,7 +1766,7 @@ list_del_init(&req->wait.entry); list_del(&iocb->ki_list); iocb->ki_res.res = mangle_poll(mask); - if (iocb->ki_eventfd && !eventfd_signal_allowed()) { + if (iocb->ki_eventfd && eventfd_signal_count()) { iocb = NULL; INIT_WORK(&req->work, aio_poll_put_work); schedule_work(&req->work); -- Gitblit v1.6.2