Merge tag 'for-6.8/io_uring-2024-01-18' of git://git.kernel.dk/linux
[sfrench/cifs-2.6.git] / io_uring / io_uring.c
index b5fa3c7df1cf87cdba2d8194282a6db85e5d7c44..cd9a137ad6cefbb907a177fd8f0c9753ac0c70dd 100644 (file)
@@ -549,7 +549,7 @@ void io_eventfd_ops(struct rcu_head *rcu)
        int ops = atomic_xchg(&ev_fd->ops, 0);
 
        if (ops & BIT(IO_EVENTFD_OP_SIGNAL_BIT))
-               eventfd_signal_mask(ev_fd->cq_ev_fd, 1, EPOLL_URING_WAKE);
+               eventfd_signal_mask(ev_fd->cq_ev_fd, EPOLL_URING_WAKE);
 
        /* IO_EVENTFD_OP_FREE_BIT may not be set here depending on callback
         * ordering in a race but if references are 0 we know we have to free
@@ -585,7 +585,7 @@ static void io_eventfd_signal(struct io_ring_ctx *ctx)
                goto out;
 
        if (likely(eventfd_signal_allowed())) {
-               eventfd_signal_mask(ev_fd->cq_ev_fd, 1, EPOLL_URING_WAKE);
+               eventfd_signal_mask(ev_fd->cq_ev_fd, EPOLL_URING_WAKE);
        } else {
                atomic_inc(&ev_fd->refs);
                if (!atomic_fetch_or(BIT(IO_EVENTFD_OP_SIGNAL_BIT), &ev_fd->ops))
@@ -3814,7 +3814,8 @@ static int io_uring_install_fd(struct file *file)
  */
 static struct file *io_uring_get_file(struct io_ring_ctx *ctx)
 {
-       return anon_inode_getfile_secure("[io_uring]", &io_uring_fops, ctx,
+       /* Create a new inode so that the LSM can block the creation.  */
+       return anon_inode_create_getfile("[io_uring]", &io_uring_fops, ctx,
                                         O_RDWR | O_CLOEXEC, NULL);
 }