[media] soc-camera: protect against racing open(2) and rmmod
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 9 Jan 2013 12:14:48 +0000 (09:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 4 Apr 2013 22:38:27 +0000 (19:38 -0300)
commit2400a1f89d329ad8948c08e6e08fef33ce42f73b
treebd414e8bc45b187584624d7b7f9e7d49f84ee236
parent53faa685fa7df0e12751eebbda30bc7e7bb5e71a
[media] soc-camera: protect against racing open(2) and rmmod

To protect against open() racing with rmmod, hold the list_lock also while
obtaining a reference to the camera host driver and check that the video
device hasn't been unregistered yet.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/soc_camera/soc_camera.c