]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Validate requested virtual size against allocated fb size
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 26 Mar 2012 20:15:53 +0000 (21:15 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 3 Apr 2012 10:18:46 +0000 (11:18 +0100)
commit982e18ce2baa0b7542ca8d4f9cbb003ab8bd4959
treee740485e5c058ad0f8e22f26081c24014e127d5a
parenta15fb3476ff36c98521281bed75a65da43c4f99c
drm: Validate requested virtual size against allocated fb size

mplayer -vo fbdev tries to create a screen that is twice as tall as the
allocated framebuffer for "doublebuffering". By default, and all in-tree
users, only sufficient memory is allocated and mapped to satisfy the
smallest framebuffer and the virtual size is no larger than the actual.
For these users, we should therefore reject any userspace request to
create a screen that requires a buffer larger than the framebuffer
originally allocated.

References: https://bugs.freedesktop.org/show_bug.cgi?id=38138
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_fb_helper.c