OpenCloudOS-Kernel/drivers/media/common/v4l2-tpg
Hans Verkuil 250854eed5 media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD
When the OSD is on (i.e. vivid displays text on top of the test pattern), and
you enable hflip, then the driver crashes.

The cause turned out to be a division of a negative number by an unsigned value.
You expect that -8 / 2U would be -4, but in reality it is 2147483644 :-(

Fixes: 3e14e7a82c ("vivid-tpg: add hor/vert downsampling support to tpg_gen_text")

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: <stable@vger.kernel.org>      # for v4.1 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-10-09 08:10:38 -04:00
..
Kconfig [media] tpg: Export the tpg code from vivid as a module 2016-04-20 16:14:39 -03:00
Makefile [media] tpg: Export the tpg code from vivid as a module 2016-04-20 16:14:39 -03:00
v4l2-tpg-colors.c media: replace ADOBERGB by OPRGB 2018-09-24 09:21:47 -04:00
v4l2-tpg-core.c media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD 2018-10-09 08:10:38 -04:00