public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Kohei KaiGai <kaigai@ak.jp.nec.com>
Cc: akpm@osdl.org, "Serge E. Hallyn" <serue@us.ibm.com>,
	"Andrew G. Morgan" <morgan@kernel.org>,
	jmorris@namei.org, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org, adobriyan@gmail.com
Subject: Re: [PATCH] exporting capability code/name pairs (try #5)
Date: Fri, 15 Feb 2008 09:58:29 +0800	[thread overview]
Message-ID: <47B4F1C5.9010408@cn.fujitsu.com> (raw)
In-Reply-To: <47B4ED1B.6070206@ak.jp.nec.com>

Kohei KaiGai wrote:

<...snip...>

> +static int __init capability_export_names(void)
> +{
> +	/* make /sys/kernel/capability */
> +	capability_kobj = kobject_create_and_add("capability", kernel_kobj);
> +	if (!capability_kobj)
> +		goto error0;
> +
> +	/* make /sys/kernel/capability/names */
> +	if (sysfs_create_group(capability_kobj,
> +			       &capability_name_attr_group))
> +		goto error1;
> +
> +	/* make /sys/kernel/capability/codes */
> +	if (sysfs_create_group(capability_kobj,
> +			       &capability_code_attr_group))
> +		goto error2;
> +
> +	if (sysfs_create_file(capability_kobj,
> +			      &cap_version_attr.attr))
> +		goto error3;
> +
> +	return 0;
> +
> +error3:
> +	sysfs_remove_group(capability_kobj, &capability_code_attr_group);
> +error2:
> +	sysfs_remove_group(capability_kobj, &capability_name_attr_group);
> +error1:
> +	kobject_put(capability_kobj);
> +error0:
> +	printk(KERN_ERR "Unable to export capabilities\n");
> +
> +	return 0;

Should return -EFXXX ..

> +}
> +__initcall(capability_export_names);
> 


  reply	other threads:[~2008-02-15  2:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25  5:18 [PATCH 1/3] exporting capability code/name pairs (try 2nd) Kohei KaiGai
2008-01-25  7:32 ` Andrew G. Morgan
2008-01-25 11:41   ` Kohei KaiGai
2008-02-01  5:17     ` [PATCH 1/3] exporting capability code/name pairs (try #3) Kohei KaiGai
2008-02-04 16:21       ` Serge E. Hallyn
2008-02-06  2:27         ` Kohei KaiGai
2008-02-06  5:08           ` Serge E. Hallyn
2008-02-08  9:42             ` [PATCH] exporting capability code/name pairs (try #4) Kohei KaiGai
2008-02-08 16:48               ` Andrew G. Morgan
2008-02-12  0:56                 ` Kohei KaiGai
2008-02-08 19:23               ` Alexey Dobriyan
2008-02-12  1:10                 ` Kohei KaiGai
2008-02-12 21:58                   ` Alexey Dobriyan
2008-02-13  8:14                     ` Kohei KaiGai
2008-02-12 18:08               ` Serge E. Hallyn
2008-02-13  8:01                 ` Kohei KaiGai
2008-02-15  1:38                   ` [PATCH] exporting capability code/name pairs (try #5) Kohei KaiGai
2008-02-15  1:58                     ` Li Zefan [this message]
2008-02-15  2:58                       ` [PATCH] exporting capability code/name pairs (try #5.1) Kohei KaiGai
2008-02-15 18:38                         ` Serge E. Hallyn
2008-02-15 18:50                           ` Greg KH
2008-02-18  7:12                             ` Kohei KaiGai
2008-02-18  7:40                               ` Greg KH
2008-02-18  8:45                                 ` Kohei KaiGai
2008-02-19 16:16                                   ` Greg KH
2008-02-20  4:38                                     ` [PATCH] exporting capability code/name pairs (try #6) Kohei KaiGai
2008-02-20  5:02                                       ` Greg KH
2008-02-20  5:38                                         ` Kohei KaiGai
2008-02-20  5:53                                           ` Greg KH
2008-02-20  6:19                                           ` [PATCH] exporting capability code/name pairs (try #6.1) Kohei KaiGai
2008-02-20  6:16                                       ` Kohei KaiGai
2008-02-20  4:39                                     ` [PATCH] exporting capability code/name pairs (try #6) Kohei KaiGai
2008-02-20  6:16                                       ` [PATCH] exporting capability code/name pairs (try #6.1) Kohei KaiGai
2008-02-18 15:15                                 ` [PATCH] exporting capability code/name pairs (try #5.1) 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=47B4F1C5.9010408@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=jmorris@namei.org \
    --cc=kaigai@ak.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=morgan@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