[PATCH 1/2] vmwgfx: Implement memory accounting for resources

2011-10-07 Thread Thomas Hellstrom
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

[PATCH 1/2] vmwgfx: Implement memory accounting for resources

2011-10-07 Thread Thomas Hellstrom
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