summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2012-12-10 23:05:28 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-27 17:34:28 -0200
commit21a73397c0cea688a37c532d1029fc8ecbd88fc6 (patch)
tree20f98db46eeb655daea7395842e3d83735795344 /mm
parent9d7005f9875460021f28df90783771875b694a32 (diff)
downloadop-kernel-dev-21a73397c0cea688a37c532d1029fc8ecbd88fc6.zip
op-kernel-dev-21a73397c0cea688a37c532d1029fc8ecbd88fc6.tar.gz
[media] media: saa7146: don't use mutex_lock_interruptible() in device_release()
Use uninterruptible mutex_lock in the release() file op to make sure all resources are properly freed when a process is being terminated. Returning -ERESTARTSYS has no effect for a terminating process and this may cause driver resources not to be released. This was found using the following semantic patch (http://coccinelle.lip6.fr/): <spml> @r@ identifier fops; identifier release_func; @@ static const struct v4l2_file_operations fops = { .release = release_func }; @depends on r@ identifier r.release_func; expression E; @@ static int release_func(...) { ... - if (mutex_lock_interruptible(E)) return -ERESTARTSYS; + mutex_lock(E); ... } </spml> Signed-off-by: Cyril Roelandt <tipecaml@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud