Skip to content

Commit

Permalink
Merge tag 'qcom-drivers-fixes-for-6.14' of https://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm driver fixes for v6.14

Fixes a locking issue in the PDR implementation, which manifest itself
as transaction timeouts during the startup procedure for some
remoteprocs.

A registration race is fixed in the custom efivars implementation,
resolving reported NULL pointer dereferences.

Error handling related to tzmem allocation is corrected, to ensure that
the allocation error is propagated.

Lastly a trivial merge mistake in pmic_glink is addressed.

* tag 'qcom-drivers-fixes-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: pdr: Fix the potential deadlock
  firmware: qcom: uefisecapp: fix efivars registration race
  firmware: qcom: scm: Fix error code in probe()
  soc: qcom: pmic_glink: Drop redundant pg assignment before taking lock

Link: https://lore.kernel.org/r/20250311022509.1232678-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Mar 14, 2025
2 parents 82645d8 + 2eeb03a commit c221dcc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
18 changes: 9 additions & 9 deletions drivers/firmware/qcom/qcom_qseecom_uefisecapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,15 +814,6 @@ static int qcom_uefisecapp_probe(struct auxiliary_device *aux_dev,

qcuefi->client = container_of(aux_dev, struct qseecom_client, aux_dev);

auxiliary_set_drvdata(aux_dev, qcuefi);
status = qcuefi_set_reference(qcuefi);
if (status)
return status;

status = efivars_register(&qcuefi->efivars, &qcom_efivar_ops);
if (status)
qcuefi_set_reference(NULL);

memset(&pool_config, 0, sizeof(pool_config));
pool_config.initial_size = SZ_4K;
pool_config.policy = QCOM_TZMEM_POLICY_MULTIPLIER;
Expand All @@ -833,6 +824,15 @@ static int qcom_uefisecapp_probe(struct auxiliary_device *aux_dev,
if (IS_ERR(qcuefi->mempool))
return PTR_ERR(qcuefi->mempool);

auxiliary_set_drvdata(aux_dev, qcuefi);
status = qcuefi_set_reference(qcuefi);
if (status)
return status;

status = efivars_register(&qcuefi->efivars, &qcom_efivar_ops);
if (status)
qcuefi_set_reference(NULL);

return status;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/firmware/qcom/qcom_scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,8 +2301,8 @@ static int qcom_scm_probe(struct platform_device *pdev)

__scm->mempool = devm_qcom_tzmem_pool_new(__scm->dev, &pool_config);
if (IS_ERR(__scm->mempool)) {
dev_err_probe(__scm->dev, PTR_ERR(__scm->mempool),
"Failed to create the SCM memory pool\n");
ret = dev_err_probe(__scm->dev, PTR_ERR(__scm->mempool),
"Failed to create the SCM memory pool\n");
goto err;
}

Expand Down
8 changes: 1 addition & 7 deletions drivers/soc/qcom/pdr_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ static int pdr_locator_new_server(struct qmi_handle *qmi,
{
struct pdr_handle *pdr = container_of(qmi, struct pdr_handle,
locator_hdl);
struct pdr_service *pds;

mutex_lock(&pdr->lock);
/* Create a local client port for QMI communication */
Expand All @@ -87,12 +86,7 @@ static int pdr_locator_new_server(struct qmi_handle *qmi,
mutex_unlock(&pdr->lock);

/* Service pending lookup requests */
mutex_lock(&pdr->list_lock);
list_for_each_entry(pds, &pdr->lookups, node) {
if (pds->need_locator_lookup)
schedule_work(&pdr->locator_work);
}
mutex_unlock(&pdr->list_lock);
schedule_work(&pdr->locator_work);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/soc/qcom/pmic_glink.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static void pmic_glink_pdr_callback(int state, char *svc_path, void *priv)

static int pmic_glink_rpmsg_probe(struct rpmsg_device *rpdev)
{
struct pmic_glink *pg = __pmic_glink;
struct pmic_glink *pg;

guard(mutex)(&__pmic_glink_lock);
pg = __pmic_glink;
Expand Down

0 comments on commit c221dcc

Please sign in to comment.