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

Commit daefdfbe authored by Tejas Prajapati's avatar Tejas Prajapati Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: ife: pagefault_ops access protected with mutex_lock



Pagefault_ops is protected by the mutex_lock to avoid the
list corruption by concurrent access by flush calls.

CRs-Fixed: 2904307
Change-Id: Ia6519a382ace7b89b6bd59a2dacfeca3c31e2705
Signed-off-by: default avatarTejas Prajapati <tpraja@codeaurora.org>
parent 90c3dafb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -324,6 +324,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx,
		return -EINVAL;
	}

	mutex_lock(&ctx->ctx_mutex);
	if ((ctx->state > CAM_CTX_AVAILABLE) &&
		(ctx->state < CAM_CTX_STATE_MAX)) {
		if (ctx->state_machine[ctx->state].pagefault_ops) {
@@ -334,6 +335,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx,
				ctx->dev_hdl, ctx->state);
		}
	}
	mutex_unlock(&ctx->ctx_mutex);

	return rc;
}