mbox series

[v2,0/7] fuse: {io-uring} Ensure fuse requests are set/read with locks

Message ID 20250125-optimize-fuse-uring-req-timeouts-v2-0-7771a2300343@ddn.com (mailing list archive)
Headers show
Series fuse: {io-uring} Ensure fuse requests are set/read with locks | expand

Message

Bernd Schubert Jan. 25, 2025, 5:43 p.m. UTC
The timeout optimization patch Joanne had set ent->fuse_req to NULL
while holding a lock and that made me to realize we might have
a problem there.

And based on that, I believe we also need to set/read pdu->ent
with write,read_once.

Cc: Luis Henriques <luis@igalia.com>
Cc: Joanne Koong <joannelkoong@gmail.com>

Signed-off-by: Bernd Schubert <bschubert@ddn.com>
---
Changes in v2:
- Further patch split to simplify review
- Fix order of reading and setting ent->fuse_req in fuse_uring_entry_teardown
- Fix compilation of individual patches (Joanne)
- Included v2 of the timeout optimization patch
- Link to v1: https://lore.kernel.org/r/20250124-optimize-fuse-uring-req-timeouts-v1-0-b834b5f32e85@ddn.com

---
Bernd Schubert (7):
      fuse: Access fuse_req under lock in fuse_uring_req_end
      fuse: Use the existing fuse_req in fuse_uring_commit
      fuse: {uring} Add struct fuse_req parameter to several functions
      fuse: Use READ_ONCE in fuse_uring_send_in_task
      fuse: use locked req consistently in fuse_uring_next_fuse_req()
      fuse: Access entries with queue lock in fuse_uring_entry_teardown
      fuse: {io-uring} Use {WRITE,READ}_ONCE for pdu->ent

 fs/fuse/dev_uring.c | 88 +++++++++++++++++++++++++++--------------------------
 1 file changed, 45 insertions(+), 43 deletions(-)
---
base-commit: 9859b70e784b07f92196d1cef7cda4ace101fd33
change-id: 20250124-optimize-fuse-uring-req-timeouts-55190797c641

Best regards,