linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shah, Amit" <aams@amazon.de>
To: "roger.pau@citrix.com" <roger.pau@citrix.com>
Cc: "boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"kys@microsoft.com" <kys@microsoft.com>,
	"Valentin, Eduardo" <eduval@lab126.com>,
	"jgross@suse.com" <jgross@suse.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"shuo.a.liu@intel.com" <shuo.a.liu@intel.com>,
	"anoob.soman@citrix.com" <anoob.soman@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/2] xen: events: free irqs in error condition
Date: Mon, 26 Feb 2018 18:57:03 +0000	[thread overview]
Message-ID: <1519671423.4965.11.camel@amazon.com> (raw)
In-Reply-To: <20180226181439.zbdtzbv7wifjst2l@MacBook-Pro-de-Roger.local>


On Mo, 2018-02-26 at 18:14 +0000, Roger Pau Monné wrote:
> On Mon, Feb 26, 2018 at 05:36:35PM +0000, Amit Shah wrote:
> > 
> > In case of errors in irq setup for MSI, free up the allocated irqs.
> > 
> > Fixes: 4892c9b4ada9f9 ("xen: add support for MSI message groups")
> > Reported-by: Hooman Mirhadi <mirhadih@amazon.com>
> > CC: <stable@vger.kernel.org>
> > CC: Roger Pau Monné <roger.pau@citrix.com>
> > CC: David Vrabel <david.vrabel@citrix.com>
> > CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> > CC: Eduardo Valentin <eduval@amazon.com>
> > CC: Juergen Gross <jgross@suse.com>
> > CC: Thomas Gleixner <tglx@linutronix.de>
> > CC: "K. Y. Srinivasan" <kys@microsoft.com>
> > CC: Liu Shuo <shuo.a.liu@intel.com>
> > CC: Anoob Soman <anoob.soman@citrix.com>
> > Signed-off-by: Amit Shah <aams@amazon.com>
> > ---
> >  drivers/xen/events/events_base.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/xen/events/events_base.c
> > b/drivers/xen/events/events_base.c
> > index b6b8b29..96aa575 100644
> > --- a/drivers/xen/events/events_base.c
> > +++ b/drivers/xen/events/events_base.c
> > @@ -758,6 +758,7 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev
> > *dev, struct msi_desc *msidesc,
> >  error_irq:
> >  	for (; i >= 0; i--)
> >  		__unbind_from_irq(irq + i);
> > +	xen_free_irq(irq);
> Hm, xen_free_irq calls irq_free_desc, which is irq_free_descs(irq,
> 1),

Er...  right.

> I think you will have to introduce a new free function:
> 
> xen_free_irqs(unsigned irq, unsigned int nr)
> 
> That calls irq_free_descs(irq, nr)

Actually, xen_free_irq() is already done in __unbind_from_irq(), so
this patch is actually wrong and not needed.


				Amit
Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B

  reply	other threads:[~2018-02-26 18:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 17:36 [PATCH 0/2] xen: fix bugs in error conditions Amit Shah
2018-02-26 17:36 ` [PATCH 1/2] xen: fix out-of-bounds irq unbind for MSI message groups Amit Shah
2018-02-26 20:02   ` Boris Ostrovsky
2018-02-26 17:36 ` [PATCH 2/2] xen: events: free irqs in error condition Amit Shah
2018-02-26 18:14   ` Roger Pau Monné
2018-02-26 18:57     ` Shah, Amit [this message]
2018-02-27  8:14       ` Roger Pau Monné
2018-02-27 15:46         ` Shah, Amit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519671423.4965.11.camel@amazon.com \
    --to=aams@amazon.de \
    --cc=anoob.soman@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=eduval@lab126.com \
    --cc=jgross@suse.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=shuo.a.liu@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).