From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ulzzn-00023I-W0 for qemu-devel@nongnu.org; Mon, 10 Jun 2013 07:10:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ulzzi-00036f-N9 for qemu-devel@nongnu.org; Mon, 10 Jun 2013 07:10:43 -0400 Date: Mon, 10 Jun 2013 13:10:29 +0200 From: "Edgar E. Iglesias" Message-ID: <20130610111028.GC5991@smtp.vpn> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 1/1] xilinx_axidma: Do not set DMA .notify to NULL after notify List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.crosthwaite@xilinx.com Cc: qemu-devel@nongnu.org, Wendy Liang , qemu-stable@nongnu.org On Fri, Jun 07, 2013 at 01:05:38PM +1000, peter.crosthwaite@xilinx.com wrote: > From: Wendy Liang > > If a stream notify function is not ready, it may re-populate the notify call- > back to indicate it should be re-polled later. This break in this usage, as > immediately following the notify() call, .notify is set to NULL. reverse the > ordering of the notify call and NULL assignment accordingly. > > [PC: Reworked commit message] > > Signed-off-by: Wendy Liang > Signed-off-by: Peter Crosthwaite Applied master, thanks Wendy and Peter. ACK for stable. Acked-by: Edgar E. Iglesias > --- > hw/dma/xilinx_axidma.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c > index 3a3ef8a..50054cf 100644 > --- a/hw/dma/xilinx_axidma.c > +++ b/hw/dma/xilinx_axidma.c > @@ -514,8 +514,9 @@ static void axidma_write(void *opaque, hwaddr addr, > break; > } > if (sid == 1 && d->notify) { > - d->notify(d->notify_opaque); > + StreamCanPushNotifyFn notifytmp = d->notify; > d->notify = NULL; > + notifytmp(d->notify_opaque); > } > stream_update_irq(s); > } > -- > 1.8.3.rc1.44.gb387c77.dirty >