]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
media: omap3isp: Don't rely on devm for memory resource management
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 13 Jul 2017 15:23:44 +0000 (11:23 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 29 May 2019 20:39:52 +0000 (16:39 -0400)
commit814434984a5d2063ac15d7ff9a46075600ff1805
tree8af7d90fa15ffab53c2501df67a6c35c9311ee3d
parentf42292040d31922ee4e4ea68e2f287fbc3bb2053
media: omap3isp: Don't rely on devm for memory resource management

devm functions are fine for managing resources that are directly related
to the device at hand and that have no other dependencies. However, a
process holding a file handle to a device created by a driver for a device
may result in the file handle left behind after the device is long gone.
This will result in accessing released (and potentially reallocated)
memory.

Instead, manage the memory resources in the driver. Releasing the
resources can be later on bound to e.g. by releasing a reference.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/omap3isp/isph3a_aewb.c
drivers/media/platform/omap3isp/isph3a_af.c
drivers/media/platform/omap3isp/isphist.c
drivers/media/platform/omap3isp/ispstat.c