Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1465643 > unrolled thread

[PATCH 4.7 048/186] [media] sur40: fix occasional oopses on device close

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-08-18 17:00 +0200
Last post2016-08-18 17:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.7 048/186] [media] sur40: fix occasional oopses on device close Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-18 17:00 +0200

#1465643 — [PATCH 4.7 048/186] [media] sur40: fix occasional oopses on device close

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-08-18 17:00 +0200
Subject[PATCH 4.7 048/186] [media] sur40: fix occasional oopses on device close
Message-ID<s7wXw-1aa-37@gated-at.bofh.it>
4.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Florian Echtler <floe@butterbrot.org>

commit 6a8588156657e607fcfdffd46c1daae8ba88a1e5 upstream.

Closing the V4L2 device sometimes triggers a kernel oops.
Present patch fixes this.

Signed-off-by: Martin Kaltenbrunner <modin@yuri.at>
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/touchscreen/sur40.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/input/touchscreen/sur40.c
+++ b/drivers/input/touchscreen/sur40.c
@@ -448,7 +448,7 @@ static void sur40_process_video(struct s
 
 	/* return error if streaming was stopped in the meantime */
 	if (sur40->sequence == -1)
-		goto err_poll;
+		return;
 
 	/* mark as finished */
 	new_buf->vb.vb2_buf.timestamp = ktime_get_ns();
@@ -736,6 +736,7 @@ static int sur40_start_streaming(struct
 static void sur40_stop_streaming(struct vb2_queue *vq)
 {
 	struct sur40_state *sur40 = vb2_get_drv_priv(vq);
+	vb2_wait_for_all_buffers(vq);
 	sur40->sequence = -1;
 
 	/* Release all active buffers */

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web