Patchwork [3.5.y.z,extended,stable] Patch "[media] fimc-lite: Don't use mutex_lock_interruptible() in" has been added to staging queue

mail settings
Submitter Herton Ronaldo Krzesinski
Date Dec. 12, 2012, 5:12 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/205433/
State New
Headers show


Herton Ronaldo Krzesinski - Dec. 12, 2012, 5:12 a.m.
This is a note to let you know that I have just added a patch titled

    [media] fimc-lite: Don't use mutex_lock_interruptible() in

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From d0925b1dce33722784e39a46f9828e37aedad039 Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki <>
Date: Thu, 22 Nov 2012 11:13:04 -0300
Subject: [PATCH] [media] fimc-lite: Don't use mutex_lock_interruptible() in
 device release()

commit ddc43d6dc7df0849fe41b91460fa76145cf87b67 upstream.

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 patch is required for stable kernels v3.5+.

Reported-by: Marek Szyprowski <>
Signed-off-by: Sylwester Nawrocki <>
Signed-off-by: Kyungmin Park <>
Signed-off-by: Mauro Carvalho Chehab <>
[ herton: adjust file name to patch ]
Signed-off-by: Herton Ronaldo Krzesinski <>
 drivers/media/video/s5p-fimc/fimc-lite.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)



diff --git a/drivers/media/video/s5p-fimc/fimc-lite.c b/drivers/media/video/s5p-fimc/fimc-lite.c
index 74ff310..9132f61 100644
--- a/drivers/media/video/s5p-fimc/fimc-lite.c
+++ b/drivers/media/video/s5p-fimc/fimc-lite.c
@@ -487,8 +487,7 @@  static int fimc_lite_close(struct file *file)
 	struct fimc_lite *fimc = video_drvdata(file);
 	int ret;

-	if (mutex_lock_interruptible(&fimc->lock))
-		return -ERESTARTSYS;
+	mutex_lock(&fimc->lock);

 	if (--fimc->ref_count == 0 && fimc->out_path == FIMC_IO_DMA) {
 		clear_bit(ST_FLITE_IN_USE, &fimc->state);