media: m920x: don't use stack on USB reads
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 6 Dec 2021 14:34:19 +0000 (15:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:36 +0000 (11:04 +0100)
commit0c044e39d52abfbb4cb43dbc5a09c1dc1ed24648
tree94a4fba3f76c5b947cbe8cccee62227bc7d2dbb9
parent6aaff2d7c9d52ae523ca318639c7dc74e751dc88
media: m920x: don't use stack on USB reads

[ Upstream commit a2ab06d7c4d6bfd0b545a768247a70463e977e27 ]

Using stack-allocated pointers for USB message data don't work.
This driver is almost OK with that, except for the I2C read
logic.

Fix it by using a temporary read buffer, just like on all other
calls to m920x_read().

Link: https://lore.kernel.org/all/ccc99e48-de4f-045e-0fe4-61e3118e3f74@mida.se/
Reported-by: rkardell@mida.se
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/dvb-usb/m920x.c