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-next>] [day] [month] [year] [list]
Message-Id: <20240429041312.2150441-1-nichen@iscas.ac.cn>
Date: Mon, 29 Apr 2024 12:13:12 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: vkoul@...nel.org,
	florian.fainelli@...adcom.com,
	rjui@...adcom.com,
	sbranden@...adcom.com
Cc: bcm-kernel-feedback-list@...adcom.com,
	dmaengine@...r.kernel.org,
	linux-rpi-kernel@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] dmaengine: bcm2835-dma: Add check for dma_set_max_seg_size

Add check for the return value of dma_set_max_seg_size() and return
the error if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
 drivers/dma/bcm2835-dma.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index 9d74fe97452e..d1e775a2f6b3 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -899,7 +899,11 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
 	if (!od)
 		return -ENOMEM;
 
-	dma_set_max_seg_size(&pdev->dev, 0x3FFFFFFF);
+	rc = dma_set_max_seg_size(&pdev->dev, 0x3FFFFFFF);
+	if (rc) {
+		dev_err(&pdev->dev, "Unable to set dma device segment size\n");
+		return rc;
+	}
 
 	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ