Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6eccfac authored by Steve Longerbeam's avatar Steve Longerbeam Committed by Greg Kroah-Hartman
Browse files

gpu: ipu-v3: image-convert: Prevent race between run and unprepare



[ Upstream commit 819bec35c8c9706185498c9222bd244e0781ad35 ]

Prevent possible race by parallel threads between ipu_image_convert_run()
and ipu_image_convert_unprepare(). This involves setting ctx->aborting
to true unconditionally so that no new job runs can be queued during
unprepare, and holding the ctx->aborting flag until the context is freed.

Note that the "normal" ipu_image_convert_abort() case (e.g. not during
context unprepare) should clear the ctx->aborting flag after aborting
any active run and clearing the context's pending queue. This is because
it should be possible to continue to use the conversion context and queue
more runs after an abort.

Signed-off-by: default avatarSteve Longerbeam <slongerbeam@gmail.com>
Tested-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 46ed4f4f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment