|
@@ -1,6 +1,6 @@
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
/*
|
|
|
- * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
|
|
*/
|
|
|
|
|
|
#include <linux/slab.h>
|
|
@@ -297,6 +297,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) {
|
|
@@ -307,6 +308,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx,
|
|
|
ctx->dev_hdl, ctx->state);
|
|
|
}
|
|
|
}
|
|
|
+ mutex_unlock(&ctx->ctx_mutex);
|
|
|
|
|
|
return rc;
|
|
|
}
|