From: Cyril Roelandt Date: Tue, 11 Dec 2012 02:05:28 +0000 (-0300) Subject: [media] media: saa7146: don't use mutex_lock_interruptible() in device_release() X-Git-Tag: v3.9-rc1~93^2~372 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21a73397c0cea688a37c532d1029fc8ecbd88fc6;p=pandora-kernel.git [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/): @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); ... } Signed-off-by: Cyril Roelandt Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed