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

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



commit ae69b059498e8a563c6d64c4aa4cb95e53d76680
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Tue Apr 12 11:43:14 2016 +0100
Commit:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
CommitDate: Fri Apr 22 11:27:31 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 8eb3046..284b345 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -789,7 +789,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#master

_______________________________________________
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®.