projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5666d4
)
drm/fb-helper: Fix clip rectangle height
author
Thomas Zimmermann
<tzimmermann@suse.de>
Wed, 9 Feb 2022 16:16:13 +0000
(17:16 +0100)
committer
Thomas Zimmermann
<tzimmermann@suse.de>
Thu, 10 Feb 2022 13:48:50 +0000
(14:48 +0100)
Computing the clip rectangle is prone to off-by-one errors when writes
happen near the end of a memory page. Point the end of the memory area
to the first trailing byte, so that (end - start) returns the area's
length.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20220209161617.3553-2-tzimmermann@suse.de
drivers/gpu/drm/drm_fb_helper.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_fb_helper.c
b/drivers/gpu/drm/drm_fb_helper.c
index f15127a32f7a74bcf0f987c1ce31e0ec37afb0d2..a37fb4a980c8705fcc9550c1ac760fdc29f71b8a 100644
(file)
--- a/
drivers/gpu/drm/drm_fb_helper.c
+++ b/
drivers/gpu/drm/drm_fb_helper.c
@@
-699,7
+699,7
@@
void drm_fb_helper_deferred_io(struct fb_info *info,
max = 0;
list_for_each_entry(page, pagelist, lru) {
start = page->index << PAGE_SHIFT;
- end = start + PAGE_SIZE
- 1
;
+ end = start + PAGE_SIZE;
min = min(min, start);
max = max(max, end);
}