diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 20:12:54 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 20:12:54 -0800 |
commit | 17b02809cfa77abcab155ce3afbb1467e7f0744f (patch) | |
tree | 4bb7b08fa29e73fb29a8e56fec766643b1eaa82e /ipc/mq_sysctl.c | |
parent | 9cd02bd876d3b1a5a93f0c9376f578bde03a6b26 (diff) | |
parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) | |
download | op-kernel-dev-17b02809cfa77abcab155ce3afbb1467e7f0744f.zip op-kernel-dev-17b02809cfa77abcab155ce3afbb1467e7f0744f.tar.gz |
Merge 3.14-rc5 into staging-next
We want those fixes in here
Diffstat (limited to 'ipc/mq_sysctl.c')
-rw-r--r-- | ipc/mq_sysctl.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c index 383d638..5bb8bfe 100644 --- a/ipc/mq_sysctl.c +++ b/ipc/mq_sysctl.c @@ -22,6 +22,16 @@ static void *get_mq(ctl_table *table) return which; } +static int proc_mq_dointvec(ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + struct ctl_table mq_table; + memcpy(&mq_table, table, sizeof(mq_table)); + mq_table.data = get_mq(table); + + return proc_dointvec(&mq_table, write, buffer, lenp, ppos); +} + static int proc_mq_dointvec_minmax(ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { @@ -33,12 +43,10 @@ static int proc_mq_dointvec_minmax(ctl_table *table, int write, lenp, ppos); } #else +#define proc_mq_dointvec NULL #define proc_mq_dointvec_minmax NULL #endif -static int msg_queues_limit_min = MIN_QUEUESMAX; -static int msg_queues_limit_max = HARD_QUEUESMAX; - static int msg_max_limit_min = MIN_MSGMAX; static int msg_max_limit_max = HARD_MSGMAX; @@ -51,9 +59,7 @@ static ctl_table mq_sysctls[] = { .data = &init_ipc_ns.mq_queues_max, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_mq_dointvec_minmax, - .extra1 = &msg_queues_limit_min, - .extra2 = &msg_queues_limit_max, + .proc_handler = proc_mq_dointvec, }, { .procname = "msg_max", |