diff mbox

[2/2] drm: Cancel drm_fb_helper_resume_work on unload

Message ID 20170207124956.14954-2-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Feb. 7, 2017, 12:49 p.m. UTC
We can not allow the worker to run after its fbdev, or even the module,
has been removed.

Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.9+
---
 drivers/gpu/drm/drm_fb_helper.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Vetter Feb. 7, 2017, 2:05 p.m. UTC | #1
On Tue, Feb 07, 2017 at 12:49:56PM +0000, Chris Wilson wrote:
> We can not allow the worker to run after its fbdev, or even the module,
> has been removed.
> 
> Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: dri-devel@lists.freedesktop.org
> Cc: <stable@vger.kernel.org> # v4.9+

Both applied to drm-misc-next-fixes (since imo not that pressing that we
need to rush them in for 4.10 ...).
-Daniel

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 2d0810c9f3dc..842c461b0b21 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -860,6 +860,7 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
>  	if (!drm_fbdev_emulation)
>  		return;
>  
> +	cancel_work_sync(&fb_helper->resume_work);
>  	cancel_work_sync(&fb_helper->dirty_work);
>  
>  	mutex_lock(&kernel_fb_helper_lock);
> -- 
> 2.11.0
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 2d0810c9f3dc..842c461b0b21 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -860,6 +860,7 @@  void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
 	if (!drm_fbdev_emulation)
 		return;
 
+	cancel_work_sync(&fb_helper->resume_work);
 	cancel_work_sync(&fb_helper->dirty_work);
 
 	mutex_lock(&kernel_fb_helper_lock);