Skip to content

Commit c221dcc

Browse files
committed
Merge tag 'qcom-drivers-fixes-for-6.14' of https://git.kernel.org/pub/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>
2 parents 82645d8 + 2eeb03a commit c221dcc

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

drivers/firmware/qcom/qcom_qseecom_uefisecapp.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -814,15 +814,6 @@ static int qcom_uefisecapp_probe(struct auxiliary_device *aux_dev,
814814

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

817-
auxiliary_set_drvdata(aux_dev, qcuefi);
818-
status = qcuefi_set_reference(qcuefi);
819-
if (status)
820-
return status;
821-
822-
status = efivars_register(&qcuefi->efivars, &qcom_efivar_ops);
823-
if (status)
824-
qcuefi_set_reference(NULL);
825-
826817
memset(&pool_config, 0, sizeof(pool_config));
827818
pool_config.initial_size = SZ_4K;
828819
pool_config.policy = QCOM_TZMEM_POLICY_MULTIPLIER;
@@ -833,6 +824,15 @@ static int qcom_uefisecapp_probe(struct auxiliary_device *aux_dev,
833824
if (IS_ERR(qcuefi->mempool))
834825
return PTR_ERR(qcuefi->mempool);
835826

827+
auxiliary_set_drvdata(aux_dev, qcuefi);
828+
status = qcuefi_set_reference(qcuefi);
829+
if (status)
830+
return status;
831+
832+
status = efivars_register(&qcuefi->efivars, &qcom_efivar_ops);
833+
if (status)
834+
qcuefi_set_reference(NULL);
835+
836836
return status;
837837
}
838838

drivers/firmware/qcom/qcom_scm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,8 +2301,8 @@ static int qcom_scm_probe(struct platform_device *pdev)
23012301

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

drivers/soc/qcom/pdr_interface.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ static int pdr_locator_new_server(struct qmi_handle *qmi,
7575
{
7676
struct pdr_handle *pdr = container_of(qmi, struct pdr_handle,
7777
locator_hdl);
78-
struct pdr_service *pds;
7978

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

8988
/* Service pending lookup requests */
90-
mutex_lock(&pdr->list_lock);
91-
list_for_each_entry(pds, &pdr->lookups, node) {
92-
if (pds->need_locator_lookup)
93-
schedule_work(&pdr->locator_work);
94-
}
95-
mutex_unlock(&pdr->list_lock);
89+
schedule_work(&pdr->locator_work);
9690

9791
return 0;
9892
}

drivers/soc/qcom/pmic_glink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static void pmic_glink_pdr_callback(int state, char *svc_path, void *priv)
233233

234234
static int pmic_glink_rpmsg_probe(struct rpmsg_device *rpdev)
235235
{
236-
struct pmic_glink *pg = __pmic_glink;
236+
struct pmic_glink *pg;
237237

238238
guard(mutex)(&__pmic_glink_lock);
239239
pg = __pmic_glink;

0 commit comments

Comments
 (0)