]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/fence: Use rcu to defer freeing of irq_work
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Dec 2017 09:48:02 +0000 (09:48 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Dec 2017 11:09:09 +0000 (11:09 +0000)
commitdac310c23b6d98b6720d23640b1d6c1fccf81c58
treeb7a00c95498d6fe6605bcaeb9e6fed99ab3ead39
parent15cca93f99e7b78cdab13d80d7380a608e1210c5
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: ab5a6f441919 ("drm/i915/fence: Avoid del_timer_sync() from inside a timer")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171213094802.28243-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_sw_fence.c