Commit 3b6b25b5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: comedi: range.c: properly mark up __user pointers

This is the start of cleaning up the user pointer markings
in the comedi core.

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 2434358a
...@@ -368,7 +368,7 @@ ...@@ -368,7 +368,7 @@
struct comedi_rangeinfo { struct comedi_rangeinfo {
unsigned int range_type; unsigned int range_type;
void *range_ptr; void __user *range_ptr;
}; };
struct comedi_krange { struct comedi_krange {
......
...@@ -25,9 +25,8 @@ ...@@ -25,9 +25,8 @@
*/ */
#define __NO_VERSION__ #define __NO_VERSION__
#include "comedi.h"
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include "comedi.h"
#include "comedi_compat32.h" #include "comedi_compat32.h"
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
......
...@@ -87,11 +87,11 @@ Configuration Options: ...@@ -87,11 +87,11 @@ Configuration Options:
* options that are used with comedi_config. * options that are used with comedi_config.
*/ */
#include <linux/string.h>
#include <linux/slab.h>
#include "../comedi.h" #include "../comedi.h"
#include "../comedilib.h" #include "../comedilib.h"
#include "../comedidev.h" #include "../comedidev.h"
#include <linux/string.h>
#include <linux/slab.h>
/* The maxiumum number of channels per subdevice. */ /* The maxiumum number of channels per subdevice. */
#define MAX_CHANS 256 #define MAX_CHANS 256
......
/* /*
* various internal comedi functions * various internal comedi functions
*/ */
int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg); int do_rangeinfo_ioctl(struct comedi_device *dev,
struct comedi_rangeinfo __user *arg);
int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s, int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data); struct comedi_insn *insn, unsigned int *data);
int comedi_alloc_board_minor(struct device *hardware_device); int comedi_alloc_board_minor(struct device *hardware_device);
......
...@@ -21,8 +21,9 @@ ...@@ -21,8 +21,9 @@
*/ */
#include "comedidev.h"
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include "comedidev.h"
#include "internal.h"
const struct comedi_lrange range_bipolar10 = { 1, {BIP_RANGE(10)} }; const struct comedi_lrange range_bipolar10 = { 1, {BIP_RANGE(10)} };
EXPORT_SYMBOL(range_bipolar10); EXPORT_SYMBOL(range_bipolar10);
...@@ -50,7 +51,8 @@ EXPORT_SYMBOL(range_unknown); ...@@ -50,7 +51,8 @@ EXPORT_SYMBOL(range_unknown);
writes: writes:
n struct comedi_krange structures to rangeinfo->range_ptr n struct comedi_krange structures to rangeinfo->range_ptr
*/ */
int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) int do_rangeinfo_ioctl(struct comedi_device *dev,
struct comedi_rangeinfo __user *arg)
{ {
struct comedi_rangeinfo it; struct comedi_rangeinfo it;
int subd, chan; int subd, chan;
......
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