[PATCH] drm/i915: Only free the unpin_work if cancelled before being run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 Apr 2012 10:29:38 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> The unpin worker frees it work struct and so during intel_crtc_disable
> we should only also free the work struct if cancel_work_sync() reports
> that it successfully cancelled the work prior to it being executed and
> thus avoid the double free.
> 
> The impact is only for people unloading modules during a fullscreen game
> or movie playback, so extremely small.

Futher review (hunting for some sign of workqueue corruption, cf
https://bugs.freedesktop.org/show_bug.cgi?id=48798) says that if work is
non-NULL here it will not have been scheduled so cancel_work_sync() will
always return true.

Which also means that we have no way of waiting upon the scheduled
unpin_work. :|
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux