diff options
| -rw-r--r-- | drivers/char/adsprpc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index f2be7f119e8c..f427be48cfdf 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -274,6 +274,7 @@ struct fastrpc_apps { struct ion_client *client; struct device *dev; bool glink; + bool secure_flag; spinlock_t ctxlock; struct smq_invoke_ctx *ctxtable[FASTRPC_CTX_MAX]; }; @@ -3092,7 +3093,8 @@ static int fastrpc_get_info(struct fastrpc_file *fl, uint32_t *info) if (err) goto bail; /* Check to see if the device node is non-secure */ - if (fl->dev_minor == MINOR_NUM_DEV) { + if (fl->dev_minor == MINOR_NUM_DEV && + fl->apps->secure_flag == true) { /* * For non secure device node check and make sure that * the channel allows non-secure access @@ -3575,10 +3577,13 @@ static int fastrpc_probe(struct platform_device *pdev) VERIFY(err, !of_property_read_u32(dev->of_node, "qcom,secure-domains", &secure_domains)); - if (!err) + if (!err) { + me->secure_flag = true; configure_secure_channels(secure_domains); - else + } else { + me->secure_flag = false; pr_info("adsprpc: unable to read the domain configuration from dts\n"); + } } if (of_device_is_compatible(dev->of_node, "qcom,msm-fastrpc-compute-cb")) @@ -3662,6 +3667,7 @@ static int __init fastrpc_device_init(void) memset(me, 0, sizeof(*me)); fastrpc_init(me); me->dev = NULL; + me->secure_flag = false; VERIFY(err, 0 == platform_driver_register(&fastrpc_driver)); if (err) goto register_bail; |
