lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211214110152.48316-2-tudor.ambarus@microchip.com>
Date:   Tue, 14 Dec 2021 13:01:52 +0200
From:   Tudor Ambarus <tudor.ambarus@...rochip.com>
To:     <broonie@...nel.org>, <quanyang.wang@...driver.com>,
        <amit.kumar-mahapatra@...inx.com>
CC:     <michal.simek@...inx.com>, <linux-spi@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        "Tudor Ambarus" <tudor.ambarus@...rochip.com>
Subject: [PATCH] Revert "spi: spi-zynqmp-gqspi: add mutex locking for exec_op"

This reverts commit a0f65be6e880a14d3445b75e7dc03d7d015fc922.

SPIMEM uses ctlr->bus_lock_mutex to prevent concurrency on
ctlr->mem_ops->exec_op().

Signed-off-by: Tudor Ambarus <tudor.ambarus@...rochip.com>
---
 drivers/spi/spi-zynqmp-gqspi.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 328b6559bb19..189fe4eb59ad 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -174,7 +174,6 @@ struct zynqmp_qspi {
 	u32 genfifoentry;
 	enum mode_type mode;
 	struct completion data_completion;
-	struct mutex op_lock;
 };
 
 /**
@@ -946,7 +945,6 @@ static int zynqmp_qspi_exec_op(struct spi_mem *mem,
 		op->cmd.opcode, op->cmd.buswidth, op->addr.buswidth,
 		op->dummy.buswidth, op->data.buswidth);
 
-	mutex_lock(&xqspi->op_lock);
 	zynqmp_qspi_config_op(xqspi, mem->spi);
 	zynqmp_qspi_chipselect(mem->spi, false);
 	genfifoentry |= xqspi->genfifocs;
@@ -1069,7 +1067,6 @@ static int zynqmp_qspi_exec_op(struct spi_mem *mem,
 return_err:
 
 	zynqmp_qspi_chipselect(mem->spi, true);
-	mutex_unlock(&xqspi->op_lock);
 
 	return err;
 }
@@ -1143,8 +1140,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
 
 	init_completion(&xqspi->data_completion);
 
-	mutex_init(&xqspi->op_lock);
-
 	pm_runtime_use_autosuspend(&pdev->dev);
 	pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
 	pm_runtime_set_active(&pdev->dev);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ