hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/aio.c
....@@ -43,6 +43,7 @@
4343 #include <linux/mount.h>
4444 #include <linux/pseudo_fs.h>
4545
46
+#include <asm/kmap_types.h>
4647 #include <linux/uaccess.h>
4748 #include <linux/nospec.h>
4849
....@@ -334,6 +335,9 @@
334335 spin_lock(&mm->ioctx_lock);
335336 rcu_read_lock();
336337 table = rcu_dereference(mm->ioctx_table);
338
+ if (!table)
339
+ goto out_unlock;
340
+
337341 for (i = 0; i < table->nr; i++) {
338342 struct kioctx *ctx;
339343
....@@ -347,6 +351,7 @@
347351 }
348352 }
349353
354
+out_unlock:
350355 rcu_read_unlock();
351356 spin_unlock(&mm->ioctx_lock);
352357 return res;
....@@ -1761,7 +1766,7 @@
17611766 list_del_init(&req->wait.entry);
17621767 list_del(&iocb->ki_list);
17631768 iocb->ki_res.res = mangle_poll(mask);
1764
- if (iocb->ki_eventfd && !eventfd_signal_allowed()) {
1769
+ if (iocb->ki_eventfd && eventfd_signal_count()) {
17651770 iocb = NULL;
17661771 INIT_WORK(&req->work, aio_poll_put_work);
17671772 schedule_work(&req->work);