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)
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>

No differences found