Skip to content

QDMA: Handle sync kiocb in async I/O path for readv/writev support#381

Open
heeuid wants to merge 1 commit intoXilinx:masterfrom
heeuid:async-io-during-sync-system-call
Open

QDMA: Handle sync kiocb in async I/O path for readv/writev support#381
heeuid wants to merge 1 commit intoXilinx:masterfrom
heeuid:async-io-during-sync-system-call

Conversation

@heeuid
Copy link
Copy Markdown

@heeuid heeuid commented Apr 13, 2026

Description

This PR fixes a kernel panic occurring when synchronous system calls (e.g., readv/writev) invoke the AIO path. These calls do not initialize ki_complete, leading to a NULL pointer dereference in the completion callback.

Changes

  • struct cdev_async_io: Added completion field to support synchronous contexts.
  • cdev_aio_read/write(): Use is_sync_kiocb() to distinguish between sync and async, and wait for completion in sync mode to ensure safe resource deallocation.

@heeuid heeuid force-pushed the async-io-during-sync-system-call branch from 1915683 to 533dbe0 Compare April 13, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant