[PATCH v2 0/2] NTB: epf: serialize MW setup and report reliable errors
From: Avi Weiss
Date: Sun Nov 01 2026 - 08:57:16 EST
This series fixes two related NTB EPF memory-window issues.
The first patch serializes shared MW parameter writes with command
submission, preventing concurrent setups from using each other's
DMA addresses.
The second patch propagates definite endpoint command errors while
completion status can still be associated with the current command.
Changes since v1:
- koichiro pointed out that an endpoint may complete CONFIGURE_MW after
the host times out. Propagating -ETIMEDOUT can cause clients to free
DMA memory while the endpoint is still configuring the mapping.
Returning success only for the timed-out command avoids that immediate
regression, but was insufficient in the end b/c a late error from
command A may be observed during command B. Returning that stale error
can cause B's buffer to be freed before B completes.
The second patch records whether any command has timed out and
preserves the original MW return behavior thereafter.
The first patch also prevents a pre-timeout regression: without
parameter serialization, propagating an explicit rejection from one
setup can release memory referenced by another concurrent setup.
v1: https://lists.openwall.net/linux-kernel/2026/10/27/2144
Review: https://lists.openwall.net/linux-kernel/2026/10/28/466
Avi Weiss (2):
NTB: epf: serialize memory window parameter writes
NTB: epf: propagate MW command errors while status is reliable
drivers/ntb/hw/epf/ntb_hw_epf.c | 37 ++++++++++++++++++++++++++-------
1 file changed, 29 insertions(+), 8 deletions(-)
base-commit: cbbddb6b08cc9900a87cccaa9b22bbe06aa4f50a
--
2.43.0