summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-17 23:30:52 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-17 23:30:52 -0300
commitbfeeaf2cd0ec399c199ab6b907d5e4e33dbe3562 (patch)
treeb230a0449c40763de34712c464bac20426603f10
parent4a106627be1f6a70e13d4fb65866f69591b64ade (diff)
downloadmediapointer-dvb-s2-bfeeaf2cd0ec399c199ab6b907d5e4e33dbe3562.tar.gz
mediapointer-dvb-s2-bfeeaf2cd0ec399c199ab6b907d5e4e33dbe3562.tar.bz2
backport commit 5794e1b14bcd9817c5fa27d3254996f0d9551296
From: Mauro Carvalho Chehab <mchehab@infradead.org> Author: Jonathan Corbet <corbet@lwn.net> Date: Thu May 15 16:26:57 2008 -0600 dvb: cdev lock_kernel() pushdown kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index 3210b938b..e6d20310a 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -33,6 +33,7 @@
#include <linux/cdev.h>
#include "compat.h"
#include <linux/mutex.h>
+#include <linux/smp_lock.h>
#include "dvbdev.h"
static int dvbdev_debug;
@@ -75,6 +76,7 @@ static int dvb_device_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev;
+ lock_kernel();
dvbdev = dvbdev_find_device (iminor(inode));
if (dvbdev && dvbdev->fops) {
@@ -95,8 +97,10 @@ static int dvb_device_open(struct inode *inode, struct file *file)
file->f_op = fops_get(old_fops);
}
fops_put(old_fops);
+ unlock_kernel();
return err;
}
+ unlock_kernel();
return -ENODEV;
}