mbox series

[0/2] aio poll: fix use-after-free and missing wakeups

Message ID 20211204002301.116139-1-ebiggers@kernel.org (mailing list archive)
Headers show
Series aio poll: fix use-after-free and missing wakeups | expand

Message

Eric Biggers Dec. 4, 2021, 12:22 a.m. UTC
This series fixes some bugs in aio poll.  This is intended to replace
"[PATCH v5] aio: Add support for the POLLFREE"
(https://lore.kernel.org/r/20211027011834.2497484-1-ramjiyani@google.com)
which has some bugs.

Careful review is appreciated; this code is very hard to work with, and
I don't know of an easy way to test it.

Note, it looks like io_uring has these same bugs too.  I haven't tried
to fix io_uring.

This applies to v5.16-rc3.

Eric Biggers (2):
  aio: keep poll requests on waitqueue until completed
  aio: fix use-after-free due to missing POLLFREE handling

 fs/aio.c                        | 138 +++++++++++++++++++++++++-------
 include/uapi/asm-generic/poll.h |   2 +-
 2 files changed, 111 insertions(+), 29 deletions(-)


base-commit: d58071a8a76d779eedab38033ae4c821c30295a5