aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r--drivers/media/video/videodev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 67a661cf5219..7649860a388d 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -36,6 +36,7 @@
36#include <linux/init.h> 36#include <linux/init.h>
37#include <linux/kmod.h> 37#include <linux/kmod.h>
38#include <linux/slab.h> 38#include <linux/slab.h>
39#include <linux/smp_lock.h>
39#include <asm/uaccess.h> 40#include <asm/uaccess.h>
40#include <asm/system.h> 41#include <asm/system.h>
41 42
@@ -442,6 +443,7 @@ static int video_open(struct inode *inode, struct file *file)
442 443
443 if(minor>=VIDEO_NUM_DEVICES) 444 if(minor>=VIDEO_NUM_DEVICES)
444 return -ENODEV; 445 return -ENODEV;
446 lock_kernel();
445 mutex_lock(&videodev_lock); 447 mutex_lock(&videodev_lock);
446 vfl=video_device[minor]; 448 vfl=video_device[minor];
447 if(vfl==NULL) { 449 if(vfl==NULL) {
@@ -451,6 +453,7 @@ static int video_open(struct inode *inode, struct file *file)
451 vfl=video_device[minor]; 453 vfl=video_device[minor];
452 if (vfl==NULL) { 454 if (vfl==NULL) {
453 mutex_unlock(&videodev_lock); 455 mutex_unlock(&videodev_lock);
456 unlock_kernel();
454 return -ENODEV; 457 return -ENODEV;
455 } 458 }
456 } 459 }
@@ -464,6 +467,7 @@ static int video_open(struct inode *inode, struct file *file)
464 } 467 }
465 fops_put(old_fops); 468 fops_put(old_fops);
466 mutex_unlock(&videodev_lock); 469 mutex_unlock(&videodev_lock);
470 unlock_kernel();
467 return err; 471 return err;
468} 472}
469 473