On Fri, Sep 26, 2025 at 03:41:42AM +0000, Zhijian Li (Fujitsu) wrote:
>
>
> On 28/08/2025 04:59, Peter Xu wrote:
> > diff --git a/migration/rdma.c b/migration/rdma.c
> > index bcd7aae2f2..2b995513aa 100644
> > --- a/migration/rdma.c
> > +++ b/migration/rdma.c
> > @@ -3068,7 +3068,6 @@ static void rdma_cm_poll_handler(void *opaque)
> > {
> > RDMAContext *rdma = opaque;
> > struct rdma_cm_event *cm_event;
> > - MigrationIncomingState *mis = migration_incoming_get_current();
> >
> > if (rdma_get_cm_event(rdma->channel, &cm_event) < 0) {
> > error_report("get_cm_event failed %d", errno);
> > @@ -3087,10 +3086,6 @@ static void rdma_cm_poll_handler(void *opaque)
> > }
> > }
> > rdma_ack_cm_event(cm_event);
>
>
> This above line should be removed as well, otherwise it will cause a double
> cm_event free.
Good catch, thanks. This fn is completely removed in the last patch, hence
it'll be an internal difference within the series.
Said that, I wonder if I should squash the last patch into this one
instead, because after this patch applied, we should be polling the fd in
two threads (main, and the loadvm thread), and operating on it concurrently
too.. which looks risky if not racy already..
>
>
>
>
> > - if (mis->loadvm_co) {
> > - qemu_coroutine_enter(mis->loadvm_co);
> > - }
> > - return;
> > }
> > rdma_ack_cm_event(cm_event);
> > }
--
Peter Xu