Fix a bug where NULL could be dereferenced during the pixmap kick-out
process by referencing the correct offscreen area. Also drive-by the comments related to these for clarity.
This commit is contained in:
parent
55c5c6953a
commit
2261710fe0
|
@ -127,7 +127,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
||||||
if (begin->state == ExaOffscreenLocked)
|
if (begin->state == ExaOffscreenLocked)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* adjust size to match alignment requirement */
|
/* adjust size needed to account for alignment loss for this area */
|
||||||
real_size = size;
|
real_size = size;
|
||||||
tmp = begin->offset % align;
|
tmp = begin->offset % align;
|
||||||
if (tmp)
|
if (tmp)
|
||||||
|
@ -164,9 +164,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* adjust size to match alignment requirement */
|
/* adjust size needed to account for alignment loss for this area */
|
||||||
real_size = size;
|
real_size = size;
|
||||||
tmp = begin->offset % align;
|
tmp = area->offset % align;
|
||||||
if (tmp)
|
if (tmp)
|
||||||
real_size += (align - tmp);
|
real_size += (align - tmp);
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
||||||
if (begin->state == ExaOffscreenLocked)
|
if (begin->state == ExaOffscreenLocked)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* adjust size to match alignment requirement */
|
/* adjust size needed to account for alignment loss for this area */
|
||||||
real_size = size;
|
real_size = size;
|
||||||
tmp = begin->offset % align;
|
tmp = begin->offset % align;
|
||||||
if (tmp)
|
if (tmp)
|
||||||
|
@ -164,9 +164,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* adjust size to match alignment requirement */
|
/* adjust size needed to account for alignment loss for this area */
|
||||||
real_size = size;
|
real_size = size;
|
||||||
tmp = begin->offset % align;
|
tmp = area->offset % align;
|
||||||
if (tmp)
|
if (tmp)
|
||||||
real_size += (align - tmp);
|
real_size += (align - tmp);
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
||||||
if (begin->state == ExaOffscreenLocked)
|
if (begin->state == ExaOffscreenLocked)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* adjust size to match alignment requirement */
|
/* adjust size needed to account for alignment loss for this area */
|
||||||
real_size = size;
|
real_size = size;
|
||||||
tmp = begin->offset % align;
|
tmp = begin->offset % align;
|
||||||
if (tmp)
|
if (tmp)
|
||||||
|
@ -164,9 +164,9 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* adjust size to match alignment requirement */
|
/* adjust size needed to account for alignment loss for this area */
|
||||||
real_size = size;
|
real_size = size;
|
||||||
tmp = begin->offset % align;
|
tmp = area->offset % align;
|
||||||
if (tmp)
|
if (tmp)
|
||||||
real_size += (align - tmp);
|
real_size += (align - tmp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue