aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-core/dmxdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-core/dmxdev.c')
-rw-r--r--drivers/media/dvb/dvb-core/dmxdev.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
index 9ddc57909d4..425862ffb28 100644
--- a/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/drivers/media/dvb/dvb-core/dmxdev.c
@@ -25,6 +25,7 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/smp_lock.h>
28#include <linux/poll.h> 29#include <linux/poll.h>
29#include <linux/ioctl.h> 30#include <linux/ioctl.h>
30#include <linux/wait.h> 31#include <linux/wait.h>
@@ -963,7 +964,7 @@ dvb_demux_read(struct file *file, char __user *buf, size_t count,
963 return ret; 964 return ret;
964} 965}
965 966
966static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, 967static int dvb_demux_do_ioctl(struct file *file,
967 unsigned int cmd, void *parg) 968 unsigned int cmd, void *parg)
968{ 969{
969 struct dmxdev_filter *dmxdevfilter = file->private_data; 970 struct dmxdev_filter *dmxdevfilter = file->private_data;
@@ -1084,10 +1085,16 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file,
1084 return ret; 1085 return ret;
1085} 1086}
1086 1087
1087static int dvb_demux_ioctl(struct inode *inode, struct file *file, 1088static long dvb_demux_ioctl(struct file *file, unsigned int cmd,
1088 unsigned int cmd, unsigned long arg) 1089 unsigned long arg)
1089{ 1090{
1090 return dvb_usercopy(inode, file, cmd, arg, dvb_demux_do_ioctl); 1091 int ret;
1092
1093 lock_kernel();
1094 ret = dvb_usercopy(file, cmd, arg, dvb_demux_do_ioctl);
1095 unlock_kernel();
1096
1097 return ret;
1091} 1098}
1092 1099
1093static unsigned int dvb_demux_poll(struct file *file, poll_table *wait) 1100static unsigned int dvb_demux_poll(struct file *file, poll_table *wait)
@@ -1139,7 +1146,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file)
1139static const struct file_operations dvb_demux_fops = { 1146static const struct file_operations dvb_demux_fops = {
1140 .owner = THIS_MODULE, 1147 .owner = THIS_MODULE,
1141 .read = dvb_demux_read, 1148 .read = dvb_demux_read,
1142 .ioctl = dvb_demux_ioctl, 1149 .unlocked_ioctl = dvb_demux_ioctl,
1143 .open = dvb_demux_open, 1150 .open = dvb_demux_open,
1144 .release = dvb_demux_release, 1151 .release = dvb_demux_release,
1145 .poll = dvb_demux_poll, 1152 .poll = dvb_demux_poll,
@@ -1152,7 +1159,7 @@ static struct dvb_device dvbdev_demux = {
1152 .fops = &dvb_demux_fops 1159 .fops = &dvb_demux_fops
1153}; 1160};
1154 1161
1155static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, 1162static int dvb_dvr_do_ioctl(struct file *file,
1156 unsigned int cmd, void *parg) 1163 unsigned int cmd, void *parg)
1157{ 1164{
1158 struct dvb_device *dvbdev = file->private_data; 1165 struct dvb_device *dvbdev = file->private_data;
@@ -1176,10 +1183,16 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file,
1176 return ret; 1183 return ret;
1177} 1184}
1178 1185
1179static int dvb_dvr_ioctl(struct inode *inode, struct file *file, 1186static long dvb_dvr_ioctl(struct file *file,
1180 unsigned int cmd, unsigned long arg) 1187 unsigned int cmd, unsigned long arg)
1181{ 1188{
1182 return dvb_usercopy(inode, file, cmd, arg, dvb_dvr_do_ioctl); 1189 int ret;
1190
1191 lock_kernel();
1192 ret = dvb_usercopy(file, cmd, arg, dvb_dvr_do_ioctl);
1193 unlock_kernel();
1194
1195 return ret;
1183} 1196}
1184 1197
1185static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait) 1198static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
@@ -1208,7 +1221,7 @@ static const struct file_operations dvb_dvr_fops = {
1208 .owner = THIS_MODULE, 1221 .owner = THIS_MODULE,
1209 .read = dvb_dvr_read, 1222 .read = dvb_dvr_read,
1210 .write = dvb_dvr_write, 1223 .write = dvb_dvr_write,
1211 .ioctl = dvb_dvr_ioctl, 1224 .unlocked_ioctl = dvb_dvr_ioctl,
1212 .open = dvb_dvr_open, 1225 .open = dvb_dvr_open,
1213 .release = dvb_dvr_release, 1226 .release = dvb_dvr_release,
1214 .poll = dvb_dvr_poll, 1227 .poll = dvb_dvr_poll,