OSDN Git Service

drm/ttm: unbind ttm before destroying node in accel move cleanup
authorBen Skeggs <bskeggs@redhat.com>
Mon, 22 Aug 2011 03:15:04 +0000 (03:15 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 25 Oct 2011 05:10:15 +0000 (07:10 +0200)
commit726e2766e04f31620d61cbb8bd9fbf7abe962d02
tree2eb4d451cec0837e096ec5ec2ce86b27a000d00f
parent379791a66688385cf75c8aece1a81fc68f536cd4
drm/ttm: unbind ttm before destroying node in accel move cleanup

commit eac2095398668f989a3dd8d00be1b87850d78c01 upstream.

Nouveau makes the assumption that if a TTM is bound there will be a mm_node
around for it and the backwards ordering here resulted in a use-after-free
on some eviction paths.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/ttm/ttm_bo_util.c