summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-02-18 02:34:53 +0000
committerDave Airlie <airlied@linux.ie>2006-02-18 02:34:53 +0000
commitff9ecc09f98a345078554bac2992f96adde9038f (patch)
tree91f57dbeb7751e08ca5aa78eea9ef32d514fdfd8
parent659e9a091d3ea61d291d6e2f0fbfb20e685dbcbf (diff)
Fixup test for memory at end of memory space
-rw-r--r--linux-core/drm_bufs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index 5e70e47f..c6dc2776 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -154,7 +154,7 @@ int drm_addmap_core(drm_device_t * dev, unsigned int offset,
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__)
- if (map->offset + map->size < map->offset ||
+ if (map->offset + (map->size - 1) < map->offset ||
map->offset < virt_to_phys(high_memory)) {
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
return -EINVAL;