[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4.1] x86: fix emuirq regression from XSA-21 fix



Jan Beulich wrote:
On 25.06.13 at 09:44, DuanZhenzhong <zhenzhong.duan@xxxxxxxxxx> wrote:
Any reason of not right? below patch does work as ret is already zero if it could get to that line.

zduan

****************************************************
x86: fix emuirq regression from XSA-21 fix

The XSA-21 patch broke the assumption of "ret" being zero prior to the
IRQ_UNBOUND check.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@xxxxxxxxxx>

--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -240,7 +240,6 @@ static int physdev_unmap_pirq(struct phy
     if ( ret )
         return ret;
- ret = -EINVAL;
     if ( unmap->pirq < 0 || unmap->pirq >= d->nr_pirqs )
         goto free_domain;

So if unmap->pirq is out of range, you'd return 0 (success)
nevertheless - how can that be correct?

Jan

You are right.

zduan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.