diff options
Diffstat (limited to 'ipc')
| -rw-r--r-- | ipc/ipc_sysctl.c | 16 | ||||
| -rw-r--r-- | ipc/mq_sysctl.c | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 40eab7314aeb..7d3704750efc 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c | |||
| @@ -27,18 +27,18 @@ static void *get_ipc(ctl_table *table) | |||
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | #ifdef CONFIG_PROC_SYSCTL | 29 | #ifdef CONFIG_PROC_SYSCTL |
| 30 | static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp, | 30 | static int proc_ipc_dointvec(ctl_table *table, int write, |
| 31 | void __user *buffer, size_t *lenp, loff_t *ppos) | 31 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 32 | { | 32 | { |
| 33 | struct ctl_table ipc_table; | 33 | struct ctl_table ipc_table; |
| 34 | memcpy(&ipc_table, table, sizeof(ipc_table)); | 34 | memcpy(&ipc_table, table, sizeof(ipc_table)); |
| 35 | ipc_table.data = get_ipc(table); | 35 | ipc_table.data = get_ipc(table); |
| 36 | 36 | ||
| 37 | return proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos); | 37 | return proc_dointvec(&ipc_table, write, buffer, lenp, ppos); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static int proc_ipc_callback_dointvec(ctl_table *table, int write, | 40 | static int proc_ipc_callback_dointvec(ctl_table *table, int write, |
| 41 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 41 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 42 | { | 42 | { |
| 43 | struct ctl_table ipc_table; | 43 | struct ctl_table ipc_table; |
| 44 | size_t lenp_bef = *lenp; | 44 | size_t lenp_bef = *lenp; |
| @@ -47,7 +47,7 @@ static int proc_ipc_callback_dointvec(ctl_table *table, int write, | |||
| 47 | memcpy(&ipc_table, table, sizeof(ipc_table)); | 47 | memcpy(&ipc_table, table, sizeof(ipc_table)); |
| 48 | ipc_table.data = get_ipc(table); | 48 | ipc_table.data = get_ipc(table); |
| 49 | 49 | ||
| 50 | rc = proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos); | 50 | rc = proc_dointvec(&ipc_table, write, buffer, lenp, ppos); |
| 51 | 51 | ||
| 52 | if (write && !rc && lenp_bef == *lenp) | 52 | if (write && !rc && lenp_bef == *lenp) |
| 53 | /* | 53 | /* |
| @@ -61,13 +61,13 @@ static int proc_ipc_callback_dointvec(ctl_table *table, int write, | |||
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | static int proc_ipc_doulongvec_minmax(ctl_table *table, int write, | 63 | static int proc_ipc_doulongvec_minmax(ctl_table *table, int write, |
| 64 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 64 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 65 | { | 65 | { |
| 66 | struct ctl_table ipc_table; | 66 | struct ctl_table ipc_table; |
| 67 | memcpy(&ipc_table, table, sizeof(ipc_table)); | 67 | memcpy(&ipc_table, table, sizeof(ipc_table)); |
| 68 | ipc_table.data = get_ipc(table); | 68 | ipc_table.data = get_ipc(table); |
| 69 | 69 | ||
| 70 | return proc_doulongvec_minmax(&ipc_table, write, filp, buffer, | 70 | return proc_doulongvec_minmax(&ipc_table, write, buffer, |
| 71 | lenp, ppos); | 71 | lenp, ppos); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| @@ -95,7 +95,7 @@ static void ipc_auto_callback(int val) | |||
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, | 97 | static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, |
| 98 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 98 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 99 | { | 99 | { |
| 100 | struct ctl_table ipc_table; | 100 | struct ctl_table ipc_table; |
| 101 | size_t lenp_bef = *lenp; | 101 | size_t lenp_bef = *lenp; |
| @@ -106,7 +106,7 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, | |||
| 106 | ipc_table.data = get_ipc(table); | 106 | ipc_table.data = get_ipc(table); |
| 107 | oldval = *((int *)(ipc_table.data)); | 107 | oldval = *((int *)(ipc_table.data)); |
| 108 | 108 | ||
| 109 | rc = proc_dointvec_minmax(&ipc_table, write, filp, buffer, lenp, ppos); | 109 | rc = proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos); |
| 110 | 110 | ||
| 111 | if (write && !rc && lenp_bef == *lenp) { | 111 | if (write && !rc && lenp_bef == *lenp) { |
| 112 | int newval = *((int *)(ipc_table.data)); | 112 | int newval = *((int *)(ipc_table.data)); |
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c index 24ae46dfe45d..8a058711fc10 100644 --- a/ipc/mq_sysctl.c +++ b/ipc/mq_sysctl.c | |||
| @@ -31,24 +31,24 @@ static void *get_mq(ctl_table *table) | |||
| 31 | return which; | 31 | return which; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp, | 34 | static int proc_mq_dointvec(ctl_table *table, int write, |
| 35 | void __user *buffer, size_t *lenp, loff_t *ppos) | 35 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 36 | { | 36 | { |
| 37 | struct ctl_table mq_table; | 37 | struct ctl_table mq_table; |
| 38 | memcpy(&mq_table, table, sizeof(mq_table)); | 38 | memcpy(&mq_table, table, sizeof(mq_table)); |
| 39 | mq_table.data = get_mq(table); | 39 | mq_table.data = get_mq(table); |
| 40 | 40 | ||
| 41 | return proc_dointvec(&mq_table, write, filp, buffer, lenp, ppos); | 41 | return proc_dointvec(&mq_table, write, buffer, lenp, ppos); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | static int proc_mq_dointvec_minmax(ctl_table *table, int write, | 44 | static int proc_mq_dointvec_minmax(ctl_table *table, int write, |
| 45 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 45 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 46 | { | 46 | { |
| 47 | struct ctl_table mq_table; | 47 | struct ctl_table mq_table; |
| 48 | memcpy(&mq_table, table, sizeof(mq_table)); | 48 | memcpy(&mq_table, table, sizeof(mq_table)); |
| 49 | mq_table.data = get_mq(table); | 49 | mq_table.data = get_mq(table); |
| 50 | 50 | ||
| 51 | return proc_dointvec_minmax(&mq_table, write, filp, buffer, | 51 | return proc_dointvec_minmax(&mq_table, write, buffer, |
| 52 | lenp, ppos); | 52 | lenp, ppos); |
| 53 | } | 53 | } |
| 54 | #else | 54 | #else |
