[PATCH 2/3] V4L: zc0301, remove bad usage of ERESTARTSYS

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, <luca.risolia@...>, <linux-usb-devel@...>, <mchehab@...>, <video4linux-list@...>
Date: Monday, October 8, 2007 - 8:34 am

zc0301, remove bad usage of ERESTARTSYS

down_read_trylock can't be interrupted and so ERESTARTSYS would reach
userspace, which is not permitted. Change it to EAGAIN

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

---
commit 235cf594bc65128250632a642f3e9d7e4df4975e
tree 0557746416827daeb4d829610fec2f0c9111a675
parent db38c559d37219c32b179ae005ca7e489336ec94
author Jiri Slaby <jirislaby@gmail.com> Mon, 08 Oct 2007 14:15:47 +0200
committer Jiri Slaby <jirislaby@gmail.com> Mon, 08 Oct 2007 14:15:47 +0200

 drivers/media/video/zc0301/zc0301_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c
index 35138c5..08a93c3 100644
--- a/drivers/media/video/zc0301/zc0301_core.c
+++ b/drivers/media/video/zc0301/zc0301_core.c
@@ -655,7 +655,7 @@ static int zc0301_open(struct inode* inode, struct file* filp)
 	int err = 0;
 
 	if (!down_read_trylock(&zc0301_dev_lock))
-		return -ERESTARTSYS;
+		return -EAGAIN;
 
 	cam = video_get_drvdata(video_devdata(filp));
 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/3] V4L: cinergyT2, remove bad usage of ERESTART..., Mauro Carvalho Chehab, (Tue Oct 9, 9:21 pm)
Re: [v4l-dvb-maintainer] [PATCH 3/3] V4L: cinergyT2, remove ..., Mauro Carvalho Chehab, (Wed Oct 10, 11:35 am)
Re: [v4l-dvb-maintainer] [PATCH 3/3] V4L: cinergyT2, remove ..., Mauro Carvalho Chehab, (Wed Oct 10, 12:17 pm)
[PATCH 2/3] V4L: zc0301, remove bad usage of ERESTARTSYS, Jiri Slaby, (Mon Oct 8, 8:34 am)