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 07:46:17 +0000 (08:46 +0100)
commit08cb4f0da9926277101d18d817048e1328ac2563
tree8bed9f3b9ef4f2eb80d39db5d194684454f1b8b9
parent5da89671769f9f935363f2e4384a759588a37ebe
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