Skip to content

Commit 65893b4

Browse files
committed
Merge tag 'io_uring-5.15-2021-10-01' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe: "Two fixes in here: - The signal issue that was discussed start of this week (me). - Kill dead fasync support in io_uring. Looks like it was broken since io_uring was initially merged, and given that nobody has ever complained about it, let's just kill it (Pavel)" * tag 'io_uring-5.15-2021-10-01' of git://git.kernel.dk/linux-block: io_uring: kill fasync io-wq: exclusively gate signal based exit on get_signal() return
2 parents f05c643 + 3f00838 commit 65893b4

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

fs/io-wq.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,7 @@ static int io_wqe_worker(void *data)
584584

585585
if (!get_signal(&ksig))
586586
continue;
587-
if (fatal_signal_pending(current) ||
588-
signal_group_exit(current->signal))
589-
break;
590-
continue;
587+
break;
591588
}
592589
last_timeout = !ret;
593590
}

fs/io_uring.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ struct io_ring_ctx {
403403
struct wait_queue_head cq_wait;
404404
unsigned cq_extra;
405405
atomic_t cq_timeouts;
406-
struct fasync_struct *cq_fasync;
407406
unsigned cq_last_tm_flush;
408407
} ____cacheline_aligned_in_smp;
409408

@@ -1614,10 +1613,8 @@ static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
16141613
wake_up(&ctx->sq_data->wait);
16151614
if (io_should_trigger_evfd(ctx))
16161615
eventfd_signal(ctx->cq_ev_fd, 1);
1617-
if (waitqueue_active(&ctx->poll_wait)) {
1616+
if (waitqueue_active(&ctx->poll_wait))
16181617
wake_up_interruptible(&ctx->poll_wait);
1619-
kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
1620-
}
16211618
}
16221619

16231620
static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
@@ -1631,10 +1628,8 @@ static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
16311628
}
16321629
if (io_should_trigger_evfd(ctx))
16331630
eventfd_signal(ctx->cq_ev_fd, 1);
1634-
if (waitqueue_active(&ctx->poll_wait)) {
1631+
if (waitqueue_active(&ctx->poll_wait))
16351632
wake_up_interruptible(&ctx->poll_wait);
1636-
kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
1637-
}
16381633
}
16391634

16401635
/* Returns true if there are no backlogged entries after the flush */
@@ -9345,13 +9340,6 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
93459340
return mask;
93469341
}
93479342

9348-
static int io_uring_fasync(int fd, struct file *file, int on)
9349-
{
9350-
struct io_ring_ctx *ctx = file->private_data;
9351-
9352-
return fasync_helper(fd, file, on, &ctx->cq_fasync);
9353-
}
9354-
93559343
static int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id)
93569344
{
93579345
const struct cred *creds;
@@ -10145,7 +10133,6 @@ static const struct file_operations io_uring_fops = {
1014510133
.mmap_capabilities = io_uring_nommu_mmap_capabilities,
1014610134
#endif
1014710135
.poll = io_uring_poll,
10148-
.fasync = io_uring_fasync,
1014910136
#ifdef CONFIG_PROC_FS
1015010137
.show_fdinfo = io_uring_show_fdinfo,
1015110138
#endif

0 commit comments

Comments
 (0)