diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-11-10 05:23:01 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-03-24 07:50:56 -0400 |
commit | e7e24df4715906ad25041b0a4ca613186d4cf849 (patch) | |
tree | 493a5c35ea01aa408ee6ba47b428c337c33c15dd | |
parent | 2dd3887b503c1cc8a61ef4a4f24462ce03f3ada5 (diff) |
drm/omap: tiler: fix race condition with engine->async
The tiler irq handler uses engine->async value, but the code that sets
engine->async and enables the interrupt does not have a barrier. This
may cause the irq handler to see the old value of engine->async, causing
memory corruption.
Reported-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index f06243b3d3c0..a1a824db1dd6 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | |||
@@ -273,6 +273,8 @@ static int dmm_txn_commit(struct dmm_txn *txn, bool wait) | |||
273 | 273 | ||
274 | /* mark whether it is async to denote list management in IRQ handler */ | 274 | /* mark whether it is async to denote list management in IRQ handler */ |
275 | engine->async = wait ? false : true; | 275 | engine->async = wait ? false : true; |
276 | /* verify that the irq handler sees the 'async' value */ | ||
277 | smp_mb(); | ||
276 | 278 | ||
277 | /* kick reload */ | 279 | /* kick reload */ |
278 | writel(engine->refill_pa, | 280 | writel(engine->refill_pa, |