From: Mario Kleiner Date: Wed, 6 Aug 2014 01:22:46 +0000 (+0200) Subject: drm: Use vblank_disable_and_save in drm_vblank_cleanup() X-Git-Tag: fixes-against-v3.18-rc2~73^2~39^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2368ffb18b1d2b04eb80478d225676caa7a3c4c8;p=pandora-kernel.git drm: Use vblank_disable_and_save in drm_vblank_cleanup() Calling vblank_disable_fn() will cause that function to no-op if !dev->vblank_disable_allowed for some kms drivers, e.g., on nouveau-kms. This can cause the gpu vblank irq's to not get disabled before freeing the dev->vblank array, so if a vblank irq fires and calls into drm_handle_vblank() after drm_vblank_cleanup() completes, it will cause use-after-free access to dev->vblank array. Call vblank_disable_and_save unconditionally, so vblank irqs are guaranteed to be off, before we delete the data structures on which they operate. Signed-off-by: Mario Kleiner Reviewed-by: Ville Syrjälä [danvet: Fix subsystem name in patch subject.] Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed