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: Tejas Prajapati <tpraja@codeaurora.org>
This commit is contained in:
Tejas Prajapati 2021-04-02 12:28:33 +05:30 • committed by Gerrit - the friendly Code Review server
commit daefdfbe1d

View file

@ -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;
}