name and nlen parameters passed to ->strategy hook are unused, remove them. In general ->strategy hook should know what it's doing, and don't do something tricky for which, say, pointer to original userspace array may be needed (name).
Unified · Split
| @@ -211,7 +211,7 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, · 210 unmodified lines | ||
| 211 | 211 | return try_set_cmode(new_cmode)?:*lenp; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | −static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, | |
| 214 | +static int cmode_sysctl(ctl_table *table, | |
| 215 | 215 | void __user *oldval, size_t __user *oldlenp, |
| 216 | 216 | void __user *newval, size_t newlen) |
| 217 | 217 | { |
| @@ -314,7 +314,7 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp, · 96 unmodified lines | ||
| 314 | 314 | return try_set_p0(new_p0)?:*lenp; |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | −static int p0_sysctl(ctl_table *table, int __user *name, int nlen, | |
| 317 | +static int p0_sysctl(ctl_table *table, | |
| 318 | 318 | void __user *oldval, size_t __user *oldlenp, |
| 319 | 319 | void __user *newval, size_t newlen) |
| 320 | 320 | { |
| @@ -358,7 +358,7 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp, · 37 unmodified lines | ||
| 358 | 358 | return try_set_cm(new_cm)?:*lenp; |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | −static int cm_sysctl(ctl_table *table, int __user *name, int nlen, | |
| 361 | +static int cm_sysctl(ctl_table *table, | |
| 362 | 362 | void __user *oldval, size_t __user *oldlenp, |
| 363 | 363 | void __user *newval, size_t newlen) |
| 364 | 364 | { |
| @@ -38,14 +38,13 @@ · 37 unmodified lines | ||
| 38 | 38 | #endif |
| 39 | 39 | |
| 40 | 40 | /* Strategy function to write EEPROM after changing string entry */ |
| 41 | −int sysctl_lasatstring(ctl_table *table, int *name, int nlen, | |
| 41 | +int sysctl_lasatstring(ctl_table *table, | |
| 42 | 42 | void *oldval, size_t *oldlenp, |
| 43 | 43 | void *newval, size_t newlen) |
| 44 | 44 | { |
| 45 | 45 | int r; |
| 46 | 46 | |
| 47 | − r = sysctl_string(table, name, | |
| 48 | − nlen, oldval, oldlenp, newval, newlen); | |
| 47 | + r = sysctl_string(table, oldval, oldlenp, newval, newlen); | |
| 49 | 48 | if (r < 0) |
| 50 | 49 | return r; |
| 51 | 50 | |
| @@ -113,13 +112,13 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, · 61 unmodified lines | ||
| 113 | 112 | #endif |
| 114 | 113 | |
| 115 | 114 | /* Sysctl for setting the IP addresses */ |
| 116 | −int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | |
| 115 | +int sysctl_lasat_intvec(ctl_table *table, | |
| 117 | 116 | void *oldval, size_t *oldlenp, |
| 118 | 117 | void *newval, size_t newlen) |
| 119 | 118 | { |
| 120 | 119 | int r; |
| 121 | 120 | |
| 122 | − r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); | |
| 121 | + r = sysctl_intvec(table, oldval, oldlenp, newval, newlen); | |
| 123 | 122 | if (r < 0) |
| 124 | 123 | return r; |
| 125 | 124 | |
| @@ -131,7 +130,7 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, · 5 unmodified lines | ||
| 131 | 130 | |
| 132 | 131 | #ifdef CONFIG_DS1603 |
| 133 | 132 | /* Same for RTC */ |
| 134 | −int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, | |
| 133 | +int sysctl_lasat_rtc(ctl_table *table, | |
| 135 | 134 | void *oldval, size_t *oldlenp, |
| 136 | 135 | void *newval, size_t newlen) |
| 137 | 136 | { |
| @@ -140,7 +139,7 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, · 2 unmodified lines | ||
| 140 | 139 | rtctmp = read_persistent_clock(); |
| 141 | 140 | if (rtctmp < 0) |
| 142 | 141 | rtctmp = 0; |
| 143 | − r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); | |
| 142 | + r = sysctl_intvec(table, oldval, oldlenp, newval, newlen); | |
| 144 | 143 | if (r < 0) |
| 145 | 144 | return r; |
| 146 | 145 | if (newval && newlen) |
| @@ -211,13 +210,13 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, · 64 unmodified lines | ||
| 211 | 210 | } |
| 212 | 211 | #endif |
| 213 | 212 | |
| 214 | −static int sysctl_lasat_prid(ctl_table *table, int *name, int nlen, | |
| 213 | +static int sysctl_lasat_prid(ctl_table *table, | |
| 215 | 214 | void *oldval, size_t *oldlenp, |
| 216 | 215 | void *newval, size_t newlen) |
| 217 | 216 | { |
| 218 | 217 | int r; |
| 219 | 218 | |
| 220 | − r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); | |
| 219 | + r = sysctl_intvec(table, oldval, oldlenp, newval, newlen); | |
| 221 | 220 | if (r < 0) |
| 222 | 221 | return r; |
| 223 | 222 | if (newval && newlen) { |
| @@ -1205,7 +1205,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp, · 1204 unmodified lines | ||
| 1205 | 1205 | return proc_dostring(&fake_table, write, filp, buffer, lenp, ppos); |
| 1206 | 1206 | } |
| 1207 | 1207 | |
| 1208 | −static int uuid_strategy(ctl_table *table, int __user *name, int nlen, | |
| 1208 | +static int uuid_strategy(ctl_table *table, | |
| 1209 | 1209 | void __user *oldval, size_t __user *oldlenp, |
| 1210 | 1210 | void __user *newval, size_t newlen) |
| 1211 | 1211 | { |
| @@ -972,7 +972,7 @@ extern int sysctl_perm(struct ctl_table_root *root, · 971 unmodified lines | ||
| 972 | 972 | |
| 973 | 973 | typedef struct ctl_table ctl_table; |
| 974 | 974 | |
| 975 | −typedef int ctl_handler (struct ctl_table *table, int __user *name, int nlen, | |
| 975 | +typedef int ctl_handler (struct ctl_table *table, | |
| 976 | 976 | void __user *oldval, size_t __user *oldlenp, |
| 977 | 977 | void __user *newval, size_t newlen); |
| 978 | 978 | |
| @@ -396,7 +396,7 @@ extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, · 395 unmodified lines | ||
| 396 | 396 | int ipv4_doint_and_flush(ctl_table *ctl, int write, |
| 397 | 397 | struct file* filp, void __user *buffer, |
| 398 | 398 | size_t *lenp, loff_t *ppos); |
| 399 | −int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, | |
| 399 | +int ipv4_doint_and_flush_strategy(ctl_table *table, | |
| 400 | 400 | void __user *oldval, size_t __user *oldlenp, |
| 401 | 401 | void __user *newval, size_t newlen); |
| 402 | 402 | #ifdef CONFIG_PROC_FS |
| @@ -129,9 +129,8 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, · 128 unmodified lines | ||
| 129 | 129 | void __user *buffer, |
| 130 | 130 | size_t *lenp, |
| 131 | 131 | loff_t *ppos); |
| 132 | −int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | |
| 133 | − int nlen, void __user *oldval, | |
| 134 | − size_t __user *oldlenp, | |
| 132 | +int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, | |
| 133 | + void __user *oldval, size_t __user *oldlenp, | |
| 135 | 134 | void __user *newval, size_t newlen); |
| 136 | 135 | #endif |
| 137 | 136 | |
| @@ -131,7 +131,7 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, · 130 unmodified lines | ||
| 131 | 131 | |
| 132 | 132 | #ifdef CONFIG_SYSCTL_SYSCALL |
| 133 | 133 | /* The generic sysctl ipc data routine. */ |
| 134 | −static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, | |
| 134 | +static int sysctl_ipc_data(ctl_table *table, | |
| 135 | 135 | void __user *oldval, size_t __user *oldlenp, |
| 136 | 136 | void __user *newval, size_t newlen) |
| 137 | 137 | { |
| @@ -169,14 +169,13 @@ static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, · 31 unmodified lines | ||
| 169 | 169 | return 1; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | −static int sysctl_ipc_registered_data(ctl_table *table, int __user *name, | |
| 173 | − int nlen, void __user *oldval, size_t __user *oldlenp, | |
| 172 | +static int sysctl_ipc_registered_data(ctl_table *table, | |
| 173 | + void __user *oldval, size_t __user *oldlenp, | |
| 174 | 174 | void __user *newval, size_t newlen) |
| 175 | 175 | { |
| 176 | 176 | int rc; |
| 177 | 177 | |
| 178 | − rc = sysctl_ipc_data(table, name, nlen, oldval, oldlenp, newval, | |
| 179 | − newlen); | |
| 178 | + rc = sysctl_ipc_data(table, oldval, oldlenp, newval, newlen); | |
| 180 | 179 | |
| 181 | 180 | if (newval && newlen && rc > 0) |
| 182 | 181 | /* |
| @@ -1500,7 +1500,6 @@ void register_sysctl_root(struct ctl_table_root *root) · 1499 unmodified lines | ||
| 1500 | 1500 | /* Perform the actual read/write of a sysctl table entry. */ |
| 1501 | 1501 | static int do_sysctl_strategy(struct ctl_table_root *root, |
| 1502 | 1502 | struct ctl_table *table, |
| 1503 | − int __user *name, int nlen, | |
| 1504 | 1503 | void __user *oldval, size_t __user *oldlenp, |
| 1505 | 1504 | void __user *newval, size_t newlen) |
| 1506 | 1505 | { |
| @@ -1514,8 +1513,7 @@ static int do_sysctl_strategy(struct ctl_table_root *root, · 7 unmodified lines | ||
| 1514 | 1513 | return -EPERM; |
| 1515 | 1514 | |
| 1516 | 1515 | if (table->strategy) { |
| 1517 | − rc = table->strategy(table, name, nlen, oldval, oldlenp, | |
| 1518 | − newval, newlen); | |
| 1516 | + rc = table->strategy(table, oldval, oldlenp, newval, newlen); | |
| 1519 | 1517 | if (rc < 0) |
| 1520 | 1518 | return rc; |
| 1521 | 1519 | if (rc > 0) |
| @@ -1525,8 +1523,7 @@ static int do_sysctl_strategy(struct ctl_table_root *root, · 3 unmodified lines | ||
| 1525 | 1523 | /* If there is no strategy routine, or if the strategy returns |
| 1526 | 1524 | * zero, proceed with automatic r/w */ |
| 1527 | 1525 | if (table->data && table->maxlen) { |
| 1528 | − rc = sysctl_data(table, name, nlen, oldval, oldlenp, | |
| 1529 | − newval, newlen); | |
| 1526 | + rc = sysctl_data(table, oldval, oldlenp, newval, newlen); | |
| 1530 | 1527 | if (rc < 0) |
| 1531 | 1528 | return rc; |
| 1532 | 1529 | } |
| @@ -1558,7 +1555,7 @@ repeat: · 25 unmodified lines | ||
| 1558 | 1555 | table = table->child; |
| 1559 | 1556 | goto repeat; |
| 1560 | 1557 | } |
| 1561 | − error = do_sysctl_strategy(root, table, name, nlen, | |
| 1558 | + error = do_sysctl_strategy(root, table, | |
| 1562 | 1559 | oldval, oldlenp, |
| 1563 | 1560 | newval, newlen); |
| 1564 | 1561 | return error; |
| @@ -2707,7 +2704,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, · 1142 unmodified lines | ||
| 2707 | 2704 | */ |
| 2708 | 2705 | |
| 2709 | 2706 | /* The generic sysctl data routine (used if no strategy routine supplied) */ |
| 2710 | −int sysctl_data(struct ctl_table *table, int __user *name, int nlen, | |
| 2707 | +int sysctl_data(struct ctl_table *table, | |
| 2711 | 2708 | void __user *oldval, size_t __user *oldlenp, |
| 2712 | 2709 | void __user *newval, size_t newlen) |
| 2713 | 2710 | { |
| @@ -2741,7 +2738,7 @@ int sysctl_data(struct ctl_table *table, int __user *name, int nlen, · 27 unmodified lines | ||
| 2741 | 2738 | } |
| 2742 | 2739 | |
| 2743 | 2740 | /* The generic string strategy routine: */ |
| 2744 | −int sysctl_string(struct ctl_table *table, int __user *name, int nlen, | |
| 2741 | +int sysctl_string(struct ctl_table *table, | |
| 2745 | 2742 | void __user *oldval, size_t __user *oldlenp, |
| 2746 | 2743 | void __user *newval, size_t newlen) |
| 2747 | 2744 | { |
| @@ -2787,7 +2784,7 @@ int sysctl_string(struct ctl_table *table, int __user *name, int nlen, · 39 unmodified lines | ||
| 2787 | 2784 | * are between the minimum and maximum values given in the arrays |
| 2788 | 2785 | * table->extra1 and table->extra2, respectively. |
| 2789 | 2786 | */ |
| 2790 | −int sysctl_intvec(struct ctl_table *table, int __user *name, int nlen, | |
| 2787 | +int sysctl_intvec(struct ctl_table *table, | |
| 2791 | 2788 | void __user *oldval, size_t __user *oldlenp, |
| 2792 | 2789 | void __user *newval, size_t newlen) |
| 2793 | 2790 | { |
| @@ -2823,7 +2820,7 @@ int sysctl_intvec(struct ctl_table *table, int __user *name, int nlen, · 29 unmodified lines | ||
| 2823 | 2820 | } |
| 2824 | 2821 | |
| 2825 | 2822 | /* Strategy function to convert jiffies to seconds */ |
| 2826 | −int sysctl_jiffies(struct ctl_table *table, int __user *name, int nlen, | |
| 2823 | +int sysctl_jiffies(struct ctl_table *table, | |
| 2827 | 2824 | void __user *oldval, size_t __user *oldlenp, |
| 2828 | 2825 | void __user *newval, size_t newlen) |
| 2829 | 2826 | { |
| @@ -2857,7 +2854,7 @@ int sysctl_jiffies(struct ctl_table *table, int __user *name, int nlen, · 27 unmodified lines | ||
| 2857 | 2854 | } |
| 2858 | 2855 | |
| 2859 | 2856 | /* Strategy function to convert jiffies to seconds */ |
| 2860 | −int sysctl_ms_jiffies(struct ctl_table *table, int __user *name, int nlen, | |
| 2857 | +int sysctl_ms_jiffies(struct ctl_table *table, | |
| 2861 | 2858 | void __user *oldval, size_t __user *oldlenp, |
| 2862 | 2859 | void __user *newval, size_t newlen) |
| 2863 | 2860 | { |
| @@ -2912,35 +2909,35 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args) · 48 unmodified lines | ||
| 2912 | 2909 | return error; |
| 2913 | 2910 | } |
| 2914 | 2911 | |
| 2915 | −int sysctl_data(struct ctl_table *table, int __user *name, int nlen, | |
| 2912 | +int sysctl_data(struct ctl_table *table, | |
| 2916 | 2913 | void __user *oldval, size_t __user *oldlenp, |
| 2917 | 2914 | void __user *newval, size_t newlen) |
| 2918 | 2915 | { |
| 2919 | 2916 | return -ENOSYS; |
| 2920 | 2917 | } |
| 2921 | 2918 | |
| 2922 | −int sysctl_string(struct ctl_table *table, int __user *name, int nlen, | |
| 2919 | +int sysctl_string(struct ctl_table *table, | |
| 2923 | 2920 | void __user *oldval, size_t __user *oldlenp, |
| 2924 | 2921 | void __user *newval, size_t newlen) |
| 2925 | 2922 | { |
| 2926 | 2923 | return -ENOSYS; |
| 2927 | 2924 | } |
| 2928 | 2925 | |
| 2929 | −int sysctl_intvec(struct ctl_table *table, int __user *name, int nlen, | |
| 2926 | +int sysctl_intvec(struct ctl_table *table, | |
| 2930 | 2927 | void __user *oldval, size_t __user *oldlenp, |
| 2931 | 2928 | void __user *newval, size_t newlen) |
| 2932 | 2929 | { |
| 2933 | 2930 | return -ENOSYS; |
| 2934 | 2931 | } |
| 2935 | 2932 | |
| 2936 | −int sysctl_jiffies(struct ctl_table *table, int __user *name, int nlen, | |
| 2933 | +int sysctl_jiffies(struct ctl_table *table, | |
| 2937 | 2934 | void __user *oldval, size_t __user *oldlenp, |
| 2938 | 2935 | void __user *newval, size_t newlen) |
| 2939 | 2936 | { |
| 2940 | 2937 | return -ENOSYS; |
| 2941 | 2938 | } |
| 2942 | 2939 | |
| 2943 | −int sysctl_ms_jiffies(struct ctl_table *table, int __user *name, int nlen, | |
| 2940 | +int sysctl_ms_jiffies(struct ctl_table *table, | |
| 2944 | 2941 | void __user *oldval, size_t __user *oldlenp, |
| 2945 | 2942 | void __user *newval, size_t newlen) |
| 2946 | 2943 | { |
| @@ -60,7 +60,7 @@ static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, · 59 unmodified lines | ||
| 60 | 60 | |
| 61 | 61 | #ifdef CONFIG_SYSCTL_SYSCALL |
| 62 | 62 | /* The generic string strategy routine: */ |
| 63 | −static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, | |
| 63 | +static int sysctl_uts_string(ctl_table *table, | |
| 64 | 64 | void __user *oldval, size_t __user *oldlenp, |
| 65 | 65 | void __user *newval, size_t newlen) |
| 66 | 66 | { |
| @@ -69,8 +69,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, · 2 unmodified lines | ||
| 69 | 69 | write = newval && newlen; |
| 70 | 70 | memcpy(&uts_table, table, sizeof(uts_table)); |
| 71 | 71 | uts_table.data = get_uts(table, write); |
| 72 | − r = sysctl_string(&uts_table, name, nlen, | |
| 73 | − oldval, oldlenp, newval, newlen); | |
| 72 | + r = sysctl_string(&uts_table, oldval, oldlenp, newval, newlen); | |
| 74 | 73 | put_uts(table, write, uts_table.data); |
| 75 | 74 | return r; |
| 76 | 75 | } |
| @@ -166,7 +166,7 @@ static int max_priority[] = { 127 }; /* From DECnet spec */ · 165 unmodified lines | ||
| 166 | 166 | |
| 167 | 167 | static int dn_forwarding_proc(ctl_table *, int, struct file *, |
| 168 | 168 | void __user *, size_t *, loff_t *); |
| 169 | −static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, | |
| 169 | +static int dn_forwarding_sysctl(ctl_table *table, | |
| 170 | 170 | void __user *oldval, size_t __user *oldlenp, |
| 171 | 171 | void __user *newval, size_t newlen); |
| 172 | 172 | |
| @@ -318,7 +318,7 @@ static int dn_forwarding_proc(ctl_table *table, int write, · 145 unmodified lines | ||
| 318 | 318 | #endif |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | −static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, | |
| 321 | +static int dn_forwarding_sysctl(ctl_table *table, | |
| 322 | 322 | void __user *oldval, size_t __user *oldlenp, |
| 323 | 323 | void __user *newval, size_t newlen) |
| 324 | 324 | { |
| @@ -132,7 +132,7 @@ static int parse_addr(__le16 *addr, char *str) · 131 unmodified lines | ||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | |
| 135 | −static int dn_node_address_strategy(ctl_table *table, int __user *name, int nlen, | |
| 135 | +static int dn_node_address_strategy(ctl_table *table, | |
| 136 | 136 | void __user *oldval, size_t __user *oldlenp, |
| 137 | 137 | void __user *newval, size_t newlen) |
| 138 | 138 | { |
| @@ -217,7 +217,7 @@ static int dn_node_address_handler(ctl_table *table, int write, · 78 unmodified lines | ||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | |
| 220 | −static int dn_def_dev_strategy(ctl_table *table, int __user *name, int nlen, | |
| 220 | +static int dn_def_dev_strategy(ctl_table *table, | |
| 221 | 221 | void __user *oldval, size_t __user *oldlenp, |
| 222 | 222 | void __user *newval, size_t newlen) |
| 223 | 223 | { |
| @@ -1283,7 +1283,7 @@ static int devinet_conf_proc(ctl_table *ctl, int write, · 1282 unmodified lines | ||
| 1283 | 1283 | return ret; |
| 1284 | 1284 | } |
| 1285 | 1285 | |
| 1286 | −static int devinet_conf_sysctl(ctl_table *table, int __user *name, int nlen, | |
| 1286 | +static int devinet_conf_sysctl(ctl_table *table, | |
| 1287 | 1287 | void __user *oldval, size_t __user *oldlenp, |
| 1288 | 1288 | void __user *newval, size_t newlen) |
| 1289 | 1289 | { |
| @@ -1379,12 +1379,11 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, · 89 unmodified lines | ||
| 1379 | 1379 | return ret; |
| 1380 | 1380 | } |
| 1381 | 1381 | |
| 1382 | −int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, | |
| 1382 | +int ipv4_doint_and_flush_strategy(ctl_table *table, | |
| 1383 | 1383 | void __user *oldval, size_t __user *oldlenp, |
| 1384 | 1384 | void __user *newval, size_t newlen) |
| 1385 | 1385 | { |
| 1386 | − int ret = devinet_conf_sysctl(table, name, nlen, oldval, oldlenp, | |
| 1387 | − newval, newlen); | |
| 1386 | + int ret = devinet_conf_sysctl(table, oldval, oldlenp, newval, newlen); | |
| 1388 | 1387 | struct net *net = table->extra2; |
| 1389 | 1388 | |
| 1390 | 1389 | if (ret == 1) |
| @@ -2908,8 +2908,6 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, · 2907 unmodified lines | ||
| 2908 | 2908 | } |
| 2909 | 2909 | |
| 2910 | 2910 | static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table, |
| 2911 | − int __user *name, | |
| 2912 | − int nlen, | |
| 2913 | 2911 | void __user *oldval, |
| 2914 | 2912 | size_t __user *oldlenp, |
| 2915 | 2913 | void __user *newval, |
| @@ -2972,16 +2970,13 @@ static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, · 56 unmodified lines | ||
| 2972 | 2970 | } |
| 2973 | 2971 | |
| 2974 | 2972 | static int ipv4_sysctl_rt_secret_interval_strategy(ctl_table *table, |
| 2975 | − int __user *name, | |
| 2976 | − int nlen, | |
| 2977 | 2973 | void __user *oldval, |
| 2978 | 2974 | size_t __user *oldlenp, |
| 2979 | 2975 | void __user *newval, |
| 2980 | 2976 | size_t newlen) |
| 2981 | 2977 | { |
| 2982 | 2978 | int old = ip_rt_secret_interval; |
| 2983 | − int ret = sysctl_jiffies(table, name, nlen, oldval, oldlenp, newval, | |
| 2984 | − newlen); | |
| 2979 | + int ret = sysctl_jiffies(table, oldval, oldlenp, newval, newlen); | |
| 2985 | 2980 | |
| 2986 | 2981 | rt_secret_reschedule(old); |
| 2987 | 2982 | |
| @@ -64,8 +64,8 @@ static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, · 63 unmodified lines | ||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /* Validate changes from sysctl interface. */ |
| 67 | −static int ipv4_sysctl_local_port_range(ctl_table *table, int __user *name, | |
| 68 | − int nlen, void __user *oldval, | |
| 67 | +static int ipv4_sysctl_local_port_range(ctl_table *table, | |
| 68 | + void __user *oldval, | |
| 69 | 69 | size_t __user *oldlenp, |
| 70 | 70 | void __user *newval, size_t newlen) |
| 71 | 71 | { |
| @@ -80,7 +80,7 @@ static int ipv4_sysctl_local_port_range(ctl_table *table, int __user *name, · 8 unmodified lines | ||
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | 82 | inet_get_local_port_range(range, range + 1); |
| 83 | − ret = sysctl_intvec(&tmp, name, nlen, oldval, oldlenp, newval, newlen); | |
| 83 | + ret = sysctl_intvec(&tmp, oldval, oldlenp, newval, newlen); | |
| 84 | 84 | if (ret == 0 && newval && newlen) { |
| 85 | 85 | if (range[1] < range[0]) |
| 86 | 86 | ret = -EINVAL; |
| @@ -109,8 +109,8 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * · 22 unmodified lines | ||
| 109 | 109 | return ret; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | −static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, | |
| 113 | − int nlen, void __user *oldval, | |
| 112 | +static int sysctl_tcp_congestion_control(ctl_table *table, | |
| 113 | + void __user *oldval, | |
| 114 | 114 | size_t __user *oldlenp, |
| 115 | 115 | void __user *newval, size_t newlen) |
| 116 | 116 | { |
| @@ -122,7 +122,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, · 5 unmodified lines | ||
| 122 | 122 | int ret; |
| 123 | 123 | |
| 124 | 124 | tcp_get_default_congestion_control(val); |
| 125 | − ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); | |
| 125 | + ret = sysctl_string(&tbl, oldval, oldlenp, newval, newlen); | |
| 126 | 126 | if (ret == 1 && newval && newlen) |
| 127 | 127 | ret = tcp_set_default_congestion_control(val); |
| 128 | 128 | return ret; |
| @@ -165,8 +165,8 @@ static int proc_allowed_congestion_control(ctl_table *ctl, · 36 unmodified lines | ||
| 165 | 165 | return ret; |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | −static int strategy_allowed_congestion_control(ctl_table *table, int __user *name, | |
| 169 | − int nlen, void __user *oldval, | |
| 168 | +static int strategy_allowed_congestion_control(ctl_table *table, | |
| 169 | + void __user *oldval, | |
| 170 | 170 | size_t __user *oldlenp, |
| 171 | 171 | void __user *newval, |
| 172 | 172 | size_t newlen) |
| @@ -179,7 +179,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam · 6 unmodified lines | ||
| 179 | 179 | return -ENOMEM; |
| 180 | 180 | |
| 181 | 181 | tcp_get_available_congestion_control(tbl.data, tbl.maxlen); |
| 182 | − ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); | |
| 182 | + ret = sysctl_string(&tbl, oldval, oldlenp, newval, newlen); | |
| 183 | 183 | if (ret == 1 && newval && newlen) |
| 184 | 184 | ret = tcp_set_allowed_congestion_control(tbl.data); |
| 185 | 185 | kfree(tbl.data); |
| @@ -3982,7 +3982,6 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp, · 3981 unmodified lines | ||
| 3982 | 3982 | } |
| 3983 | 3983 | |
| 3984 | 3984 | static int addrconf_sysctl_forward_strategy(ctl_table *table, |
| 3985 | − int __user *name, int nlen, | |
| 3986 | 3985 | void __user *oldval, |
| 3987 | 3986 | size_t __user *oldlenp, |
| 3988 | 3987 | void __user *newval, size_t newlen) |
| @@ -1730,9 +1730,8 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f · 1729 unmodified lines | ||
| 1730 | 1730 | return ret; |
| 1731 | 1731 | } |
| 1732 | 1732 | |
| 1733 | −int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | |
| 1734 | − int nlen, void __user *oldval, | |
| 1735 | − size_t __user *oldlenp, | |
| 1733 | +int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, | |
| 1734 | + void __user *oldval, size_t __user *oldlenp, | |
| 1736 | 1735 | void __user *newval, size_t newlen) |
| 1737 | 1736 | { |
| 1738 | 1737 | struct net_device *dev = ctl->extra1; |
| @@ -1745,13 +1744,11 @@ int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, · 6 unmodified lines | ||
| 1745 | 1744 | |
| 1746 | 1745 | switch (ctl->ctl_name) { |
| 1747 | 1746 | case NET_NEIGH_REACHABLE_TIME: |
| 1748 | − ret = sysctl_jiffies(ctl, name, nlen, | |
| 1749 | − oldval, oldlenp, newval, newlen); | |
| 1747 | + ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen); | |
| 1750 | 1748 | break; |
| 1751 | 1749 | case NET_NEIGH_RETRANS_TIME_MS: |
| 1752 | 1750 | case NET_NEIGH_REACHABLE_TIME_MS: |
| 1753 | − ret = sysctl_ms_jiffies(ctl, name, nlen, | |
| 1754 | − oldval, oldlenp, newval, newlen); | |
| 1751 | + ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen); | |
| 1755 | 1752 | break; |
| 1756 | 1753 | default: |
| 1757 | 1754 | ret = 0; |