[media] s5p-fimc: Don't use mutex_lock_interruptible() in device release()
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 22 Nov 2012 14:12:16 +0000 (11:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 26 Nov 2012 20:30:19 +0000 (18:30 -0200)
commitba6b372cf0af564bdc6c14bf68e078ae34bef222
treeb5c2da9fd63da3d145e7a9dd530cb2319a5e576f
parent97d66c47277fc801bc1ee93559a848057181ea55
[media] s5p-fimc: 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 caused driver resources not to be released. Not
releasing the buffer queue also prevented other drivers to free
memory, e.g. in MMAP -> USERPTR scenario.
This patch is required for stable kernels v3.6+.

Reported-by: Kamil Debski <k.debski@samsung.com>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s5p-fimc/fimc-capture.c
drivers/media/platform/s5p-fimc/fimc-m2m.c