From: Alexey Dobriyan <adobriyan@gmail.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>,
Linux Containers <containers@lists.osdl.org>
Subject: Re: [PATCH 4/4] mqueue namespace: adapt sysctl
Date: Tue, 24 Feb 2009 07:35:12 +0300 [thread overview]
Message-ID: <20090224043512.GA3202@x200.localdomain> (raw)
In-Reply-To: <20090224030933.GC11441@us.ibm.com>
On Mon, Feb 23, 2009 at 09:09:33PM -0600, Serge E. Hallyn wrote:
> +#ifdef CONFIG_PROC_FS
> +static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp,
> + 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, filp, buffer, lenp, ppos);
> +}
> +
> +static int proc_mq_dointvec_minmax(ctl_table *table, int write,
> + struct file *filp, 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_minmax(&mq_table, write, filp, buffer,
> + lenp, ppos);
> +}
> +#else /* CONFIG_PROC_FS */
> +static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp,
> + void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> + return -ENOSYS;
> +}
> +
> +static int proc_mq_dointvec_minmax(ctl_table *table, int write,
> + struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> + return -ENOSYS;
> +}
> +#endif /* CONFIG_PROC_FS */
These should be under CONFIG_PROC_SYSCTL and one should define them to
NULL otherwise.
> +static ctl_table mq_sysctls[] = {
> + {
> + .procname = "queues_max",
> + .data = &init_ipc_ns.mq_queues_max,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = &proc_mq_dointvec,
^
No &, please. I'm removing them.
> + },
> + {
> + .procname = "msg_max",
> + .data = &init_ipc_ns.mq_msg_max,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = &proc_mq_dointvec_minmax,
> + .extra1 = &msg_max_limit_min,
> + .extra2 = &msg_max_limit_max,
> + },
> + {
> + .procname = "msgsize_max",
> + .data = &init_ipc_ns.mq_msgsize_max,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = &proc_mq_dointvec_minmax,
> + .extra1 = &msg_maxsize_limit_min,
> + .extra2 = &msg_maxsize_limit_max,
> + },
next prev parent reply other threads:[~2009-02-24 4:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-24 3:03 [PATCH 1/4] move proc_net_get_sb to a generic fs/super.c helper Serge E. Hallyn
2009-02-24 3:09 ` [PATCH 2/4] mqueue ns: move mqueue_mnt into struct ipc_namespace Serge E. Hallyn
2009-02-24 3:09 ` [PATCH 3/4] ipc namespaces: implement support for posix msqueues Serge E. Hallyn
2009-02-24 3:09 ` [PATCH 4/4] mqueue namespace: adapt sysctl Serge E. Hallyn
2009-02-24 4:35 ` Alexey Dobriyan [this message]
2009-02-24 8:25 ` Cedric Le Goater
2009-02-24 22:02 Serge E. Hallyn
2009-02-24 22:16 ` Andrew Morton
2009-02-24 22:32 ` Serge E. Hallyn
2009-02-24 22:32 ` Alexey Dobriyan
2009-02-24 22:48 ` Andrew Morton
2009-02-24 23:23 ` Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090224043512.GA3202@x200.localdomain \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®