ia64/linux-2.6.18-xen.hg

changeset 311:ca05cf1a9bdc

pvfb: PVFB frontend can send bogus screen updates

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@redhat.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Nov 16 16:55:46 2007 +0000 (2007-11-16)
parents fced90d566f1
children 4576e10034d6 037c44559e55
files drivers/xen/fbfront/xenfb.c
line diff
     1.1 --- a/drivers/xen/fbfront/xenfb.c	Sat Nov 10 10:18:28 2007 +0000
     1.2 +++ b/drivers/xen/fbfront/xenfb.c	Fri Nov 16 16:55:46 2007 +0000
     1.3 @@ -201,6 +201,11 @@ static void xenfb_update_screen(struct x
     1.4  
     1.5  	mutex_unlock(&info->mm_lock);
     1.6  
     1.7 +	if (x2 < x1 || y2 < y1) {
     1.8 +		printk("xenfb_update_screen bogus rect %d %d %d %d\n",
     1.9 +		       x1, x2, y1, y2);
    1.10 +		WARN_ON(1);
    1.11 +	}
    1.12  	xenfb_do_update(info, x1, y1, x2 - x1, y2 - y1);
    1.13  }
    1.14  
    1.15 @@ -252,7 +257,6 @@ static int xenfb_setcolreg(unsigned regn
    1.16  static void xenfb_timer(unsigned long data)
    1.17  {
    1.18  	struct xenfb_info *info = (struct xenfb_info *)data;
    1.19 -	info->dirty = 1;
    1.20  	wake_up(&info->wq);
    1.21  }
    1.22  
    1.23 @@ -272,6 +276,7 @@ static void __xenfb_refresh(struct xenfb
    1.24  		info->x1 = x1;
    1.25  	if (info->x2 < x2)
    1.26  		info->x2 = x2;
    1.27 +	info->dirty = 1;
    1.28  
    1.29  	if (timer_pending(&info->refresh))
    1.30  		return;