WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1/2][PVFB][TOOLS] PVFB frontend can send bogus screen

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 1/2][PVFB][TOOLS] PVFB frontend can send bogus screen updates
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Tue, 13 Nov 2007 17:44:07 +0100
Delivery-date: Tue, 13 Nov 2007 08:44:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <871waurt8t.fsf@xxxxxxxxxxxxxxxxx> (Markus Armbruster's message of "Tue\, 13 Nov 2007 17\:43\:30 +0100")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <871waurt8t.fsf@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
The PVFB frontend can get confused and send a screen update to the
backend when the screen is actually clean.  Such an update asks for
the impossible rectangle (x1, x2, y1, y2) = (INT_MAX, 0, INT_MAX, 0).
Fix by setting the dirty flag in the obvious place: when the dirty
rectangle is grown.

Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>

diff -r cf8b6cafa2f0 drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c       Thu Nov 08 18:26:08 2007 +0000
+++ b/drivers/xen/fbfront/xenfb.c       Tue Nov 13 17:32:48 2007 +0100
@@ -201,6 +201,11 @@ static void xenfb_update_screen(struct x
 
        mutex_unlock(&info->mm_lock);
 
+       if (x2 < x1 || y2 < y1) {
+               printk("xenfb_update_screen bogus rect %d %d %d %d\n",
+                      x1, x2, y1, y2);
+               WARN_ON(1);
+       }
        xenfb_do_update(info, x1, y1, x2 - x1, y2 - y1);
 }
 
@@ -252,7 +257,6 @@ static void xenfb_timer(unsigned long da
 static void xenfb_timer(unsigned long data)
 {
        struct xenfb_info *info = (struct xenfb_info *)data;
-       info->dirty = 1;
        wake_up(&info->wq);
 }
 
@@ -272,6 +276,7 @@ static void __xenfb_refresh(struct xenfb
                info->x1 = x1;
        if (info->x2 < x2)
                info->x2 = x2;
+       info->dirty = 1;
 
        if (timer_pending(&info->refresh))
                return;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>