Skip to content
Commit 2cf654db authored by Chris Wilson's avatar Chris Wilson Committed by Jani Nikula
Browse files

drm/i915/fence: Use rcu to defer freeing of irq_work



It is illegal to perform an immediate free of the struct irq_work from
inside the irq_work callback (as irq_work_run_list modifies work->flags
after execution of the work->func()). As we use the irq_work to
coordinate the freeing of the callback from two different softirq paths,
we need to defer the kfree from inside our irq_work callback, for which
we can use kfree_rcu.

Fixes: 81c0ed21 ("drm/i915/fence: Avoid del_timer_sync() from inside a timer")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171213094802.28243-1-chris@chris-wilson.co.uk


(cherry picked from commit 7d622351)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 74c7b078
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment