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]
Date:	Tue, 24 Nov 2015 09:52:35 +0100
From:	M'boumba Cedric Madianga <cedric.madianga@...il.com>
To:	mcoquelin.stm32@...il.com, dan.j.williams@...el.com,
	vinod.koul@...el.com, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org
Cc:	M'boumba Cedric Madianga <cedric.madianga@...il.com>
Subject: [PATCH] dmaengine: stm32-dma: Fix static checker warning

This patch fix an unchecked dereference warning by returning operation
not permitted when stm32_dma_start_transfer() does not succeed to allocate
a virtual channel descriptor.

Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@...il.com>
---
 drivers/dma/stm32-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
index 12f3a3e..0214bcf 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -437,7 +437,7 @@ static int stm32_dma_start_transfer(struct stm32_dma_chan *chan)
 	if (!chan->desc) {
 		vdesc = vchan_next_desc(&chan->vchan);
 		if (!vdesc)
-			return 0;
+			return -EPERM;
 
 		chan->desc = to_stm32_dma_desc(vdesc);
 		chan->next_sg = 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ