• Thomas Hellstrom's avatar
    drm/ttm: Fix buffer object metadata accounting regression v2 · a393c730
    Thomas Hellstrom authored
    A regression was introduced in the 3.3 rc series, commit
    "drm/ttm: simplify memory accounting for ttm user v2",
    causing the metadata of buffer objects created using the ttm_bo_create()
    function to be accounted twice.
    That causes massive leaks with the vmwgfx driver running for example
    SpecViewperf Catia-03 test 2, eventually killing the app.
    
    Furthermore, the same commit introduces a regression where
    metadata accounting is leaked if a buffer object is
    initialized with an illegal size. This is also fixed with this commit.
    
    v2: Fixed an error path and removed an unused variable.
    Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Jerome Glisse <jglisse@redhat.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    a393c730
ttm_bo.c 46.3 KB