[svn-commits] tzafrir: linux/trunk r7164 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Sep 21 11:37:24 CDT 2009


Author: tzafrir
Date: Mon Sep 21 11:37:20 2009
New Revision: 7164

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=7164
Log:
Mark some userspace parameters with __user . No functional change.

Mark parameters for some system calls as __user . This handles some of
the cases, but still leaves copy_from_user / copy_to_user that are
currently always used with an explicit cast.

A minor patch from issue #14808 .

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=7164&r1=7163&r2=7164
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Sep 21 11:37:20 2009
@@ -1970,7 +1970,7 @@
 	write_unlock_irqrestore(&chan_lock, flags);
 }
 
-static ssize_t dahdi_chan_read(struct file *file, char *usrbuf, size_t count, int unit)
+static ssize_t dahdi_chan_read(struct file *file, char __user *usrbuf, size_t count, int unit)
 {
 	struct dahdi_chan *chan = chans[unit];
 	int amnt;
@@ -2096,7 +2096,7 @@
 	return range1 + range2;
 }
 
-static ssize_t dahdi_chan_write(struct file *file, const char *usrbuf, size_t count, int unit)
+static ssize_t dahdi_chan_write(struct file *file, const char __user *usrbuf, size_t count, int unit)
 {
 	unsigned long flags;
 	struct dahdi_chan *chan = chans[unit];
@@ -2842,7 +2842,7 @@
 }
 #endif
 
-static ssize_t dahdi_read(struct file *file, char *usrbuf, size_t count, loff_t *ppos)
+static ssize_t dahdi_read(struct file *file, char __user *usrbuf, size_t count, loff_t *ppos)
 {
 	int unit = UNIT(file);
 	struct dahdi_chan *chan;
@@ -2876,7 +2876,7 @@
 	return dahdi_chan_read(file, usrbuf, count, unit);
 }
 
-static ssize_t dahdi_write(struct file *file, const char *usrbuf, size_t count, loff_t *ppos)
+static ssize_t dahdi_write(struct file *file, const char __user *usrbuf, size_t count, loff_t *ppos)
 {
 	int unit = UNIT(file);
 	struct dahdi_chan *chan;




More information about the svn-commits mailing list