From: Greg Kroah-Hartman Date: Tue, 19 Mar 2019 14:56:23 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v3.18.137~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15bfdeb41860e06927f45d0f267bf3ee2141f364;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: media-videobuf2-v4l2-drop-warn_on-in-vb2_warn_zero_bytesused.patch --- diff --git a/queue-4.14/media-videobuf2-v4l2-drop-warn_on-in-vb2_warn_zero_bytesused.patch b/queue-4.14/media-videobuf2-v4l2-drop-warn_on-in-vb2_warn_zero_bytesused.patch new file mode 100644 index 00000000000..98eb54a6908 --- /dev/null +++ b/queue-4.14/media-videobuf2-v4l2-drop-warn_on-in-vb2_warn_zero_bytesused.patch @@ -0,0 +1,34 @@ +From 5e99456c20f712dcc13d9f6ca4278937d5367355 Mon Sep 17 00:00:00 2001 +From: Hans Verkuil +Date: Mon, 19 Nov 2018 10:33:44 -0500 +Subject: media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused() + +From: Hans Verkuil + +commit 5e99456c20f712dcc13d9f6ca4278937d5367355 upstream. + +Userspace shouldn't set bytesused to 0 for output buffers. +vb2_warn_zero_bytesused() warns about this (only once!), but it also +calls WARN_ON(1), which is confusing since it is not immediately clear +that it warns about a 0 value for bytesused. + +Just drop the WARN_ON as it serves no purpose. + +Signed-off-by: Hans Verkuil +Acked-by: Ezequiel Garcia +Signed-off-by: Mauro Carvalho Chehab +Cc: Matthias Maennich +Signed-off-by: Greg Kroah-Hartman + +diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c +index f02d452ceeb9..1244c246d0c4 100644 +--- a/drivers/media/common/videobuf2/videobuf2-v4l2.c ++++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c +@@ -158,7 +158,6 @@ static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) + return; + + check_once = true; +- WARN_ON(1); + + pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n"); + if (vb->vb2_queue->allow_zero_bytesused)