projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
724e6d3
)
drm: Fix a bug in the range manager.
author
Thomas Hellstrom
<thellstrom@vmware.com>
Thu, 11 Feb 2010 23:17:59 +0000
(
00:17
+0100)
committer
Dave Airlie
<airlied@redhat.com>
Mon, 15 Feb 2010 01:19:14 +0000
(11:19 +1000)
When searching for free space in a range, the function could return a node extending outside of the given range.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_mm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_mm.c
b/drivers/gpu/drm/drm_mm.c
index
cdec329
..
2ac074c
100644
(file)
--- a/
drivers/gpu/drm/drm_mm.c
+++ b/
drivers/gpu/drm/drm_mm.c
@@
-405,7
+405,8
@@
struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm,
wasted += alignment - tmp;
}
- if (entry->size >= size + wasted) {
+ if (entry->size >= size + wasted &&
+ (entry->start + wasted + size) <= end) {
if (!best_match)
return entry;
if (entry->size < best_size) {