All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: Re: [PATCH] xen: fix off-by-one error in	find_unbound_irq
Date: Fri, 26 Feb 2010 12:13:38 -0800	[thread overview]
Message-ID: <4B882B72.3000207@goop.org> (raw)
In-Reply-To: <1267183329.11737.12225.camel@zakaz.uk.xensource.com>

On 02/26/2010 03:22 AM, Ian Campbell wrote:
> BTW, this is against xen/master, the original patch isn't in xen/next.
>    

Looks like it came from the pcifront branch which isn't in xen/next yet.

     J

> On Fri, 2010-02-26 at 10:59 +0000, Ian Campbell wrote:
>    
>> e459de95 "Find an unbound irq number in reverse order (high to low)" introduced
>> an off by one error which would cause repeated allocations of the nr_irq'th IRQ
>> if there are no spare interrupts (i.e. get_nr_hw_irqs() == nr_irqs).
>>
>> Signed-off-by: Ian Campbell<ian.campbell@citrix.com>
>> Cc: Konrad Rzeszutek Wilk<konrad.wilk@oracle.com>
>> Cc: Jeremy Fitzhardinge<jeremy.fitzhardinge@citrix.com>
>> ---
>>   drivers/xen/events.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
>> index 99f2b2a..5c64e1d 100644
>> --- a/drivers/xen/events.c
>> +++ b/drivers/xen/events.c
>> @@ -377,7 +377,7 @@ static int find_unbound_irq(void)
>>   		if (irq_info[irq].type == IRQT_UNBOUND)
>>   			break;
>>
>> -	if (irq == start || irq == nr_irqs)
>> +	if (irq == start || irq == nr_irqs - 1)
>>   		panic("No available IRQ to bind to: increase nr_irqs!\n");
>>
>>   	desc = irq_to_desc_alloc_node(irq, 0);
>>      
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>    

  reply	other threads:[~2010-02-26 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 10:59 [PATCH] xen: fix off-by-one error in find_unbound_irq Ian Campbell
2010-02-26 11:22 ` Ian Campbell
2010-02-26 20:13   ` Jeremy Fitzhardinge [this message]
2010-02-26 21:21     ` Ian Campbell
2010-03-01 13:07       ` Ian Campbell

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=4B882B72.3000207@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Jeremy.Fitzhardinge@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.