media: gspca: fix frame overflow error
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 20 Nov 2018 10:13:04 +0000 (05:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:17 +0000 (09:16 +0100)
commitc4dabf370838d1cf3bae6e96fc1a02cd39f9404f
tree273a99da9e243e101ceeadecbc91aec142aac6bc
parentfbb982c6ad97fcaca3d0e01a98c56bf665d34163
media: gspca: fix frame overflow error

commit f96d84488f7d5f9123428c700cea82a292bca53e upstream.

When converting gspca to vb2 I missed that fact that the buffer sizes
were rounded up to the next page size. As a result some gspca drivers
(spca561 being one of them) reported frame overflows.

Modify the code to align the buffer sizes to the next page size, just
as the original code did.

Fixes: 1f5965c4dfd7 ("media: gspca: convert to vb2")
Tested-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: softwarebugs <softwarebugs@protonmail.com>
Cc: <stable@vger.kernel.org> # for v4.18 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/gspca/gspca.c