On Wed, 2017-12-13 at 09:48 +0000, Chris Wilson wrote:
> 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: 81c0ed21aa91 ("drm/i915/fence: Avoid del_timer_sync() from inside a 
> timer")
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>

<SNIP>

> @@ -367,6 +367,7 @@ struct i915_sw_dma_fence_cb {
>       struct dma_fence *dma;
>       struct timer_list timer;
>       struct irq_work work;
> +     struct rcu_head rcu;

To reduce the chances of hitting the 4095 limit, maybe throw this right
after the base? OTOH, it'll yell if it breaks...

Reviewed-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to