* [Devel] [PATCH vz10] fs/fuse kio: unlink the tx before completing its msg on RDMA_READ_ACK
@ 2026-09-28 15:03 Konstantin Khorenko
2026-09-29 16:57 ` Konstantin Khorenko
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khorenko @ 2026-09-28 15:03 UTC (permalink / raw)
To: Liu Kui; +Cc: devel
Use safe style: remove the tx from the list and clear tx->msg
before completing the message, so the list never exposes a dead
pointer.
Right now it's not a problem: currently nobody reads ex->msg without
ep->mutex, so it's a precausion.
https://virtuozzo.atlassian.net/browse/VSTOR-141673
Feature: vStorage
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_rdma_io.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c
index 2001297010a64..c582b583cf797 100644
--- a/fs/fuse/kio/pcs/pcs_rdma_io.c
+++ b/fs/fuse/kio/pcs/pcs_rdma_io.c
@@ -928,9 +928,11 @@ static int rio_handle_rx_read_ack(struct pcs_rdmaio *rio,
list_for_each_entry(tx, &rio->active_txs, list)
if (tx->xid == rack->xid) {
- rio_msg_sent(rio, NULL, tx->msg, 1);
- tx->msg = NULL;
+ struct pcs_msg *msg = tx->msg;
+
list_del(&tx->list);
+ tx->msg = NULL;
+ rio_msg_sent(rio, NULL, msg, 1);
rio_handle_tx(rio, tx, !rack->status);
return 0;
}
---
base-commit: 0679f0d70523972eec3a0643565521d93e26eb9c
change-id: 20260928-prep-kh-vstor-141673-kio-read-ack-order-9fc2b40d4077
Best regards,
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Devel] [PATCH vz10] fs/fuse kio: unlink the tx before completing its msg on RDMA_READ_ACK
2026-09-28 15:03 [Devel] [PATCH vz10] fs/fuse kio: unlink the tx before completing its msg on RDMA_READ_ACK Konstantin Khorenko
@ 2026-09-29 16:57 ` Konstantin Khorenko
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Khorenko @ 2026-09-29 16:57 UTC (permalink / raw)
To: devel; +Cc: Liu Kui
Kui Liu
I prefer to drop this one, it doesn't make anything better though.
On 9/28/26 17:03, Konstantin Khorenko wrote:
> Use safe style: remove the tx from the list and clear tx->msg
> before completing the message, so the list never exposes a dead
> pointer.
>
> Right now it's not a problem: currently nobody reads ex->msg without
> ep->mutex, so it's a precausion.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-141673
>
> Feature: vStorage
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
> ---
> fs/fuse/kio/pcs/pcs_rdma_io.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c
> index 2001297010a64..c582b583cf797 100644
> --- a/fs/fuse/kio/pcs/pcs_rdma_io.c
> +++ b/fs/fuse/kio/pcs/pcs_rdma_io.c
> @@ -928,9 +928,11 @@ static int rio_handle_rx_read_ack(struct pcs_rdmaio *rio,
>
> list_for_each_entry(tx, &rio->active_txs, list)
> if (tx->xid == rack->xid) {
> - rio_msg_sent(rio, NULL, tx->msg, 1);
> - tx->msg = NULL;
> + struct pcs_msg *msg = tx->msg;
> +
> list_del(&tx->list);
> + tx->msg = NULL;
> + rio_msg_sent(rio, NULL, msg, 1);
> rio_handle_tx(rio, tx, !rack->status);
> return 0;
> }
>
> ---
> base-commit: 0679f0d70523972eec3a0643565521d93e26eb9c
> change-id: 20260928-prep-kh-vstor-141673-kio-read-ack-order-9fc2b40d4077
>
> Best regards,
> --
> Konstantin Khorenko <khorenko@virtuozzo.com>
>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-29 16:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 15:03 [Devel] [PATCH vz10] fs/fuse kio: unlink the tx before completing its msg on RDMA_READ_ACK Konstantin Khorenko
2026-09-29 16:57 ` Konstantin Khorenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.