From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyDEl-0006C1-QC for qemu-devel@nongnu.org; Mon, 16 Nov 2015 01:26:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyDEi-0001zJ-Id for qemu-devel@nongnu.org; Mon, 16 Nov 2015 01:25:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyDEi-0001yz-EL for qemu-devel@nongnu.org; Mon, 16 Nov 2015 01:25:56 -0500 Date: Mon, 16 Nov 2015 14:25:50 +0800 From: Fam Zheng Message-ID: <20151116062550.GD20672@ad.usersys.redhat.com> References: <1447063704-24893-1-git-send-email-stefanha@redhat.com> <1447063704-24893-6-git-send-email-stefanha@redhat.com> <56461961.8060407@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56461961.8060407@redhat.com> Subject: Re: [Qemu-devel] [PULL v2 5/7] aio: Introduce aio-epoll.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , qemu-devel@nongnu.org, Stefan Hajnoczi On Fri, 11/13 18:09, Paolo Bonzini wrote: > > +static void aio_epoll_update(AioContext *ctx, AioHandler *node, bool is_new) > > +{ > > + struct epoll_event event; > > + int r; > > + > > + if (!ctx->epoll_enabled) { > > + return; > > + } > > + if (!node->pfd.events) { > > Coverity says that node might have been freed by the time you call > aio_epoll_update. You need to pass node->pfd.fd and node->pfd.events by > value instead, I think, or move the call earlier in aio_set_fd_handler. > Yes, I'll send a patch. Fam