]> git.baikalelectronics.ru Git - kernel.git/commit
vmwgfx: Implement memory accounting for resources
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 7 Oct 2011 13:23:06 +0000 (15:23 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 10 Oct 2011 08:01:44 +0000 (09:01 +0100)
commitb0a159d37f3a0fb662206b5fa3c91212885bffb2
treed946756ccdca539c8ca707f02b2a47a3e589c649
parent5a8715d997abcabceaa1f76f9a51af8d4783e1b7
vmwgfx: Implement memory accounting for resources

Contexts, surfaces and streams allocate persistent kernel memory as the
direct result of user-space requests. Make sure this memory is
accounted as graphics memory, to avoid DOS vulnerabilities.

Also take the TTM read lock around resource creation to block
switched-out dri clients from allocating resources.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c