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: <1425825653-14768-10-git-send-email-prabhakar.csengg@gmail.com>
Date:	Sun,  8 Mar 2015 14:40:45 +0000
From:	Lad Prabhakar <prabhakar.csengg@...il.com>
To:	Scott Jiang <scott.jiang.linux@...il.com>,
	linux-media@...r.kernel.org, Hans Verkuil <hverkuil@...all.nl>
Cc:	adi-buildroot-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org,
	"Lad, Prabhakar" <prabhakar.csengg@...il.com>
Subject: [PATCH v4 09/17] media: blackfin: bfin_capture: make sure all buffers are returned on stop_streaming() callback

From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>

In start_streaming() callback the buffer is removed from the
dma_queue list and assigned to cur_frm, this patch makes sure
that is returned to vb2 core with VB2_BUF_STATE_ERROR flag.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@...il.com>
Acked-by: Scott Jiang <scott.jiang.linux@...il.com>
Tested-by: Scott Jiang <scott.jiang.linux@...il.com>
---
 drivers/media/platform/blackfin/bfin_capture.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
index 2a9e933..f2b1a23 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -374,6 +374,9 @@ static void bcap_stop_streaming(struct vb2_queue *vq)
 				"stream off failed in subdev\n");
 
 	/* release all active buffers */
+	if (bcap_dev->cur_frm)
+		vb2_buffer_done(&bcap_dev->cur_frm->vb, VB2_BUF_STATE_ERROR);
+
 	while (!list_empty(&bcap_dev->dma_queue)) {
 		bcap_dev->cur_frm = list_entry(bcap_dev->dma_queue.next,
 						struct bcap_buffer, list);
-- 
2.1.0

--
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