mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-11 07:28:10 +09:00
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> (cherry picked from commit ef44d7cb0c00968dc62987a6d0438ec30ca8c06c) https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd http://www.spinics.net/lists/linux-media/msg122688.html Signed-off-by: Marc Herbert <marc.herbert@intel.com> Conflicts: drivers/media/pci/intel/ipu3/ipu3-cio2.c (implement change in non-upstream driver) drivers/media/platform/davinci/vpif_capture.c (Change vpif_probe() instead of newer vpif_capture_get_pdata() UNTESTED) drivers/media/platform/omap3isp/isp.c (Add .bound = isp_subdev_notifier_bound which we still have UNTESTED) drivers/media/platform/atmel/atmel-isc.c drivers/media/platform/atmel/atmel-isi.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/stm32/stm32-dcmi.c drivers/media/platform/ti-vpe/cal.c drivers/staging/media/imx/imx-media-dev.c (Ignore drivers we don't have) BUG=b:64133998 TEST=media device topology shows subdevs registered successfully TEST=no camera regression Change-Id: Ic3c4a327763507c8b4fa242ae4642a633e3c7dbc Reviewed-on: https://chromium-review.googlesource.com/693689 Commit-Ready: Tomasz Figa <tfiga@chromium.org> Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>