]> git.baikalelectronics.ru Git - 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)
commit39a841272fb258283831f66d1efcf08b09bea0a7
tree8af7d90fa15ffab53c2501df67a6c35c9311ee3d
parentb06ca3a4dc1cac88cf3a67825c431d907fce7935
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