Re: [PATCH v3 1/3] migration/rdma: Fix write-side shutdown
Jinpu Wang <[email protected]>
| Newsgroups | org.nongnu.qemu-devel |
|---|---|
| Message-ID | <CAMGffEma-GtSiSsRoJ3ifwFCmnkYjgQoVHOFkdY1P3inwbUPiQ@mail.gmail.com> |
On Sun, Aug 23, 2026 at 4:17 AM Yanfei Xu <[email protected]> wrote: > > qio_channel_rdma_shutdown() reads rdmain for both the input and > output contexts. As a result, a write-side shutdown marks the input > context as errored while leaving the output context active. A shutdown > of both directions also fails to stop the output context. > > Read rdmaout from the output context so each shutdown direction marks > the corresponding RDMA context as errored. > > Fixes: 54db882f073a ("migration: implement the shutdown for RDMA QIOChannel") > Signed-off-by: Yanfei Xu <[email protected]> > Reviewed-by: Fabiano Rosas <[email protected]> > Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Jack Wang <[email protected]> > --- > migration/rdma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index c076dc04e8..fc6cb75167 100644 > --- a/migration/rdma.c > +++ b/migration/rdma.c > @@ -2993,7 +2993,7 @@ qio_channel_rdma_shutdown(QIOChannel *ioc, > RCU_READ_LOCK_GUARD(); > > rdmain = qatomic_rcu_read(&rioc->rdmain); > - rdmaout = qatomic_rcu_read(&rioc->rdmain); > + rdmaout = qatomic_rcu_read(&rioc->rdmaout); > > switch (how) { > case QIO_CHANNEL_SHUTDOWN_READ: > -- > 2.20.1