From 333c319df3338584a0998739aefc171febeff230 Mon Sep 17 00:00:00 2001 From: Yong Ding Date: Tue, 19 Jun 2018 16:20:32 +0800 Subject: soc: qcom: hab: return -EINTR if woken up by a signal The standard -EINTR will be returned if the hab open blocking call is woken up by a signal. Change-Id: I0329c3b3a70241a31a64eab6872808e0f7d21013 Signed-off-by: Yong Ding --- drivers/soc/qcom/hab/hab.c | 7 ++++--- drivers/soc/qcom/hab/hab_open.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/soc/qcom/hab/hab.c b/drivers/soc/qcom/hab/hab.c index 0427845a2d14..48d61870f776 100644 --- a/drivers/soc/qcom/hab/hab.c +++ b/drivers/soc/qcom/hab/hab.c @@ -120,7 +120,7 @@ void hab_ctx_free(struct kref *ref) write_lock(&ctx->exp_lock); list_for_each_entry_safe(exp, exp_tmp, &ctx->exp_whse, node) { list_del(&exp->node); - pr_err("potential leak exp %d vcid %X recovered\n", + pr_debug("potential leak exp %d vcid %X recovered\n", exp->export_id, exp->vcid_local); habmem_hyp_revoke(exp->payload, exp->payload_count); habmem_remove_export(exp); @@ -131,7 +131,7 @@ void hab_ctx_free(struct kref *ref) list_for_each_entry_safe(exp, exp_tmp, &ctx->imp_whse, node) { list_del(&exp->node); ctx->import_total--; - pr_warn("leaked imp %d vcid %X for ctx is collected total %d\n", + pr_debug("leaked imp %d vcid %X for ctx is collected total %d\n", exp->export_id, exp->vcid_local, ctx->import_total); habmm_imp_hyp_unmap(ctx->import_ctx, exp, ctx->kernel); @@ -329,7 +329,8 @@ struct virtual_channel *frontend_open(struct uhab_context *ctx, vchan->id); hab_open_pending_exit(ctx, pchan, &pending_open); - ret = -EINVAL; + if (ret != -EINTR) + ret = -EINVAL; goto err; } diff --git a/drivers/soc/qcom/hab/hab_open.c b/drivers/soc/qcom/hab/hab_open.c index 50ebdf6852fe..f740a43c1973 100644 --- a/drivers/soc/qcom/hab/hab_open.c +++ b/drivers/soc/qcom/hab/hab_open.c @@ -165,8 +165,8 @@ int hab_open_listen(struct uhab_context *ctx, pr_warn("local closing during open ret %d\n", ret); ret = -ENODEV; } else if (-ERESTARTSYS == ret) { - pr_warn("local interrupted during open ret %d\n", ret); - ret = -EAGAIN; + pr_warn("local interrupted ret %d\n", ret); + ret = -EINTR; } } -- cgit v1.2.3