diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 40ce2d983b12..3e214beabbe9 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1703,8 +1703,8 @@ int __init sysctl_init(void) | |||
1703 | 1703 | ||
1704 | #ifdef CONFIG_PROC_SYSCTL | 1704 | #ifdef CONFIG_PROC_SYSCTL |
1705 | 1705 | ||
1706 | static int _proc_do_string(void* data, int maxlen, int write, | 1706 | static int _proc_do_string(char *data, int maxlen, int write, |
1707 | void __user *buffer, | 1707 | char __user *buffer, |
1708 | size_t *lenp, loff_t *ppos) | 1708 | size_t *lenp, loff_t *ppos) |
1709 | { | 1709 | { |
1710 | size_t len; | 1710 | size_t len; |
@@ -1730,7 +1730,7 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
1730 | len = maxlen-1; | 1730 | len = maxlen-1; |
1731 | if(copy_from_user(data, buffer, len)) | 1731 | if(copy_from_user(data, buffer, len)) |
1732 | return -EFAULT; | 1732 | return -EFAULT; |
1733 | ((char *) data)[len] = 0; | 1733 | data[len] = 0; |
1734 | *ppos += *lenp; | 1734 | *ppos += *lenp; |
1735 | } else { | 1735 | } else { |
1736 | len = strlen(data); | 1736 | len = strlen(data); |
@@ -1748,10 +1748,10 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
1748 | if (len > *lenp) | 1748 | if (len > *lenp) |
1749 | len = *lenp; | 1749 | len = *lenp; |
1750 | if (len) | 1750 | if (len) |
1751 | if(copy_to_user(buffer, data, len)) | 1751 | if (copy_to_user(buffer, data, len)) |
1752 | return -EFAULT; | 1752 | return -EFAULT; |
1753 | if (len < *lenp) { | 1753 | if (len < *lenp) { |
1754 | if(put_user('\n', ((char __user *) buffer) + len)) | 1754 | if (put_user('\n', buffer + len)) |
1755 | return -EFAULT; | 1755 | return -EFAULT; |
1756 | len++; | 1756 | len++; |
1757 | } | 1757 | } |
@@ -1781,8 +1781,8 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
1781 | int proc_dostring(struct ctl_table *table, int write, | 1781 | int proc_dostring(struct ctl_table *table, int write, |
1782 | void __user *buffer, size_t *lenp, loff_t *ppos) | 1782 | void __user *buffer, size_t *lenp, loff_t *ppos) |
1783 | { | 1783 | { |
1784 | return _proc_do_string(table->data, table->maxlen, write, | 1784 | return _proc_do_string((char *)(table->data), table->maxlen, write, |
1785 | buffer, lenp, ppos); | 1785 | (char __user *)buffer, lenp, ppos); |
1786 | } | 1786 | } |
1787 | 1787 | ||
1788 | static size_t proc_skip_spaces(char **buf) | 1788 | static size_t proc_skip_spaces(char **buf) |