Unverified Commit c221dcc7 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'qcom-drivers-fixes-for-6.14' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 82645d8a 2eeb03ad
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -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;
@@ -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;
}

+2 −2
Original line number Diff line number Diff line
@@ -2301,7 +2301,7 @@ 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),
		ret = dev_err_probe(__scm->dev, PTR_ERR(__scm->mempool),
				    "Failed to create the SCM memory pool\n");
		goto err;
	}
+1 −7
Original line number Diff line number Diff line
@@ -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 */
@@ -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);

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -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;