OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: devel@openvz.org
Cc: Liu Kui <kui.liu@virtuozzo.com>
Subject: Re: [Devel] [PATCH vz10] fs/fuse kio: unlink the tx before completing its msg on RDMA_READ_ACK
Date: Tue, 29 Sep 2026 18:57:48 +0200	[thread overview]
Message-ID: <6b0a4d64-fac5-4528-b6ab-a81cfea0c55b@virtuozzo.com> (raw)
In-Reply-To: <20260928-prep-kh-vstor-141673-kio-read-ack-order-v1-1-6069e78cac95@virtuozzo.com>

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

      reply	other threads:[~2026-09-29 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 15:03 Konstantin Khorenko
2026-09-29 16:57 ` Konstantin Khorenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b0a4d64-fac5-4528-b6ab-a81cfea0c55b@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=kui.liu@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox