Commit 94d1b985 authored by Patrick Mochel's avatar Patrick Mochel

[sysfs] Add __user tag to appropriate parameters.

From Greg Kroah-Hartman
parent 76d2b471
......@@ -22,7 +22,7 @@ fill_read(struct dentry *dentry, char *buffer, loff_t off, size_t count)
}
static ssize_t
read(struct file * file, char * userbuf, size_t count, loff_t * off)
read(struct file * file, char __user * userbuf, size_t count, loff_t * off)
{
char *buffer = file->private_data;
struct dentry *dentry = file->f_dentry;
......@@ -65,7 +65,7 @@ flush_write(struct dentry *dentry, char *buffer, loff_t offset, size_t count)
return attr->write(kobj, buffer, offset, count);
}
static ssize_t write(struct file * file, const char * userbuf,
static ssize_t write(struct file * file, const char __user * userbuf,
size_t count, loff_t * off)
{
char *buffer = file->private_data;
......
......@@ -109,7 +109,7 @@ static int fill_read_buffer(struct file * file, struct sysfs_buffer * buffer)
* the amount they specify each time.
* This may be called continuously until the buffer is empty.
*/
static int flush_read_buffer(struct sysfs_buffer * buffer, char * buf,
static int flush_read_buffer(struct sysfs_buffer * buffer, char __user * buf,
size_t count, loff_t * ppos)
{
int error;
......@@ -143,7 +143,7 @@ static int flush_read_buffer(struct sysfs_buffer * buffer, char * buf,
*/
static ssize_t
sysfs_read_file(struct file *file, char *buf, size_t count, loff_t *ppos)
sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct sysfs_buffer * buffer = file->private_data;
ssize_t retval = 0;
......@@ -169,7 +169,7 @@ sysfs_read_file(struct file *file, char *buf, size_t count, loff_t *ppos)
*/
static int
fill_write_buffer(struct sysfs_buffer * buffer, const char * buf, size_t count)
fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t count)
{
int error;
......@@ -224,7 +224,7 @@ flush_write_buffer(struct file * file, struct sysfs_buffer * buffer, size_t coun
*/
static ssize_t
sysfs_write_file(struct file *file, const char *buf, size_t count, loff_t *ppos)
sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
struct sysfs_buffer * buffer = file->private_data;
......
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