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

[Xen-changelog] [qemu-xen stable-4.6] xenfb: use the correct condition to avoid excessive looping



commit 62936f64308aae81530b1273ad2c248b6476e62e
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Tue Apr 12 11:43:14 2016 +0100
Commit:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
CommitDate: Mon Apr 25 11:14:08 2016 +0100

    xenfb: use the correct condition to avoid excessive looping
    
    In commit ac0487e1 ("xenfb.c: avoid expensive loops when prod <=
    out_cons"), ">=" was used. In fact, a full ring is a legit state.
    Correct the test to use ">".
    
    upstream-commit-id: 4df26e88ee2f23c01418630368e87b719ed06b75
    
    Reported-by: "Hao, Xudong" <xudong.hao@xxxxxxxxx>
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Tested-by: "Hao, Xudong" <xudong.hao@xxxxxxxxx>
    Acked-by: Anthony Perard <anthony.perard@xxxxxxxxxx>
    Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 hw/display/xenfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 56d1a36..4cde110 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -784,7 +784,7 @@ static void xenfb_handle_events(struct XenFB *xenfb)
 
     prod = page->out_prod;
     out_cons = page->out_cons;
-    if (prod - out_cons >= XENFB_OUT_RING_LEN) {
+    if (prod - out_cons > XENFB_OUT_RING_LEN) {
         return;
     }
     xen_rmb();         /* ensure we see ring contents up to prod */
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#stable-4.6

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

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