Commit 92d0127c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: comedi: __user markup on comedi_fops.c

Hm, what a mess.  I tried to properly mark up the __user pointers,
but for some of these structures, we use them both in the kernel,
and across the user/kernel boundry, which isn't ok.  So we end
up generating a few new sparse warnings in places we were not before,
but the large majority of things are now properly tagged in the fops
file.

The whole ioctl interface needs to be carefully looked at in the future.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7029a874
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
struct comedi_insn { struct comedi_insn {
unsigned int insn; unsigned int insn;
unsigned int n; unsigned int n;
unsigned int *data; unsigned int __user *data;
unsigned int subdev; unsigned int subdev;
unsigned int chanspec; unsigned int chanspec;
unsigned int unused[3]; unsigned int unused[3];
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
struct comedi_insnlist { struct comedi_insnlist {
unsigned int n_insns; unsigned int n_insns;
struct comedi_insn *insns; struct comedi_insn __user *insns;
}; };
struct comedi_cmd { struct comedi_cmd {
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
unsigned int stop_src; unsigned int stop_src;
unsigned int stop_arg; unsigned int stop_arg;
unsigned int *chanlist; /* channel/range list */ unsigned int __user *chanlist; /* channel/range list */
unsigned int chanlist_len; unsigned int chanlist_len;
short *data; /* data list, size depends on subd flags */ short *data; /* data list, size depends on subd flags */
...@@ -360,9 +360,9 @@ ...@@ -360,9 +360,9 @@
struct comedi_chaninfo { struct comedi_chaninfo {
unsigned int subdev; unsigned int subdev;
unsigned int *maxdata_list; unsigned int __user *maxdata_list;
unsigned int *flaglist; unsigned int __user *flaglist;
unsigned int *rangelist; unsigned int __user *rangelist;
unsigned int unused[4]; unsigned int unused[4];
}; };
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment