]> asedeno.scripts.mit.edu Git - linux.git/commit
media: v4l: async: Move async subdev notifier operations to a separate structure
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 30 Aug 2017 17:18:04 +0000 (13:18 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 17:51:45 +0000 (13:51 -0400)
commitb6ee3f0dcf43dc3e8dbbe9be9c4e728c8d52f1ba
tree4171a3b2634b8238b12188cd55fd629157efaeb6
parentbce9e317cec9c4ffff3dde1170c0ad70f5e690c8
media: v4l: async: Move async subdev notifier operations to a separate structure

The async subdev notifier .bound(), .unbind() and .complete() operations
are function pointers stored directly in the v4l2_async_subdev
structure. As the structure isn't immutable, this creates a potential
security risk as the function pointers are mutable.

To fix this, move the function pointers to a new
v4l2_async_subdev_operations structure that can be made const in
drivers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
18 files changed:
drivers/media/platform/am437x/am437x-vpfe.c
drivers/media/platform/atmel/atmel-isc.c
drivers/media/platform/atmel/atmel-isi.c
drivers/media/platform/davinci/vpif_capture.c
drivers/media/platform/davinci/vpif_display.c
drivers/media/platform/exynos4-is/media-dev.c
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/pxa_camera.c
drivers/media/platform/qcom/camss-8x16/camss.c
drivers/media/platform/rcar-vin/rcar-core.c
drivers/media/platform/rcar_drif.c
drivers/media/platform/soc_camera/soc_camera.c
drivers/media/platform/stm32/stm32-dcmi.c
drivers/media/platform/ti-vpe/cal.c
drivers/media/platform/xilinx/xilinx-vipp.c
drivers/media/v4l2-core/v4l2-async.c
drivers/staging/media/imx/imx-media-dev.c
include/media/v4l2-async.h