From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 18/18] xen/arm: IRQ: Handle multiple action per IRQ Date: Wed, 23 Apr 2014 16:28:20 +0100 Message-ID: <5357DC14.4050108@linaro.org> References: <1398171530-27391-1-git-send-email-julien.grall@linaro.org> <1398171530-27391-19-git-send-email-julien.grall@linaro.org> <1398262073.18537.129.camel@kazak.uk.xensource.com> <5357D489.10308@linaro.org> <1398266216.18537.168.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wcz60-0002mn-Bt for xen-devel@lists.xenproject.org; Wed, 23 Apr 2014 15:28:24 +0000 Received: by mail-ee0-f51.google.com with SMTP id c13so914382eek.38 for ; Wed, 23 Apr 2014 08:28:22 -0700 (PDT) In-Reply-To: <1398266216.18537.168.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, Keir Fraser , tim@xen.org, Jan Beulich , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 04/23/2014 04:16 PM, Ian Campbell wrote: > On Wed, 2014-04-23 at 15:56 +0100, Julien Grall wrote: >>>> + do >>>> + { >>>> + action->handler(irq, action->dev_id, regs); >>>> + action = action->next; >>>> + } while ( action ); >>> >>> What happens if action is freed and recycled in the midst of this loop? >> >> Nothing, the action won't be free until IRQ_INPROGRESS is set (see do .. >> while at the end of release_irq). > > BY that logic wasn't the version which used the list macros also safe > then? No because we had to modify two pointers (next and prev). Here as we modify only one pointer, do_IRQ may or may not call action for a last time. -- Julien Grall