media: ti-vpe: cal: fix write to unallocated memory
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 13 Jan 2021 09:00:27 +0000 (10:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:41 +0000 (11:37 +0100)
commitb1f4731f33bab76107e25d95eb4234eb6de4873a
tree9fc53b0e3dd0c29d6682682436245d1a5f895503
parent640da89f3eee94beed76a2e4b6b86987463a0274
media: ti-vpe: cal: fix write to unallocated memory

[ Upstream commit 5a402af5e19f215689e8bf3cc244c21d94eba3c4 ]

The asd allocated with v4l2_async_notifier_add_fwnode_subdev() must be
of size cal_v4l2_async_subdev, otherwise access to
cal_v4l2_async_subdev->phy will go to unallocated memory.

Fixes: 8fcb7576ad19 ("media: ti-vpe: cal: Allow multiple contexts per subdev notifier")
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/ti-vpe/cal.c