On Thu, Mar 23, 2023 at 06:02:36AM +0100, Paolo Bonzini wrote:
> Il mer 22 mar 2023, 15:55 Stefan Hajnoczi <stefa...@redhat.com> ha scritto:
> 
> > +    /* The list must not change while we add fds to epoll */
> > +    if (!qemu_lockcnt_dec_if_lock(&ctx->list_lock)) {
> > +        return false;
> > +    }
> > +
> > +    ok = fdmon_epoll_try_enable(ctx);
> > +
> > +    qemu_lockcnt_unlock(&ctx->list_lock);
> >
> 
> Shouldn't this be inc_and_unlock to balance the change made by dec_if_lock?

Yes, the caller expects list_lock to still be incremented. Thanks for
catching this!

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to