Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1207536 > unrolled thread
| Started by | Lubomir Rintel <lkundrak@v3.sk> |
|---|---|
| First post | 2015-08-14 15:30 +0200 |
| Last post | 2015-08-17 23:00 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] kdbus: create /sys/fs/kdbus with sysfs_create_mount_point() Lubomir Rintel <lkundrak@v3.sk> - 2015-08-14 15:30 +0200
Re: [PATCH] kdbus: create /sys/fs/kdbus with sysfs_create_mount_point() David Herrmann <dh.herrmann@gmail.com> - 2015-08-17 19:30 +0200
Re: [PATCH] kdbus: create /sys/fs/kdbus with sysfs_create_mount_point() Josh Boyer <jwboyer@fedoraproject.org> - 2015-08-17 23:00 +0200
| From | Lubomir Rintel <lkundrak@v3.sk> |
|---|---|
| Date | 2015-08-14 15:30 +0200 |
| Subject | [PATCH] kdbus: create /sys/fs/kdbus with sysfs_create_mount_point() |
| Message-ID | <pXndw-3ix-3@gated-at.bofh.it> |
Since 0cbee99269 user-namespace pull, if a kdbusfs is mounted on a
location that's not created with sysfs_create_mount_point the user
namespaces are not allowed to mount their sysfs instances.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
Applies on top of char-misc/kdbus a36324913.
ipc/kdbus/main.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/ipc/kdbus/main.c b/ipc/kdbus/main.c
index 1ad4dc8..c2117ea 100644
--- a/ipc/kdbus/main.c
+++ b/ipc/kdbus/main.c
@@ -75,16 +75,13 @@
* '» struct kdbus_ep *ep (owned)
*/
-/* kdbus mount-point /sys/fs/kdbus */
-static struct kobject *kdbus_dir;
-
static int __init kdbus_init(void)
{
int ret;
- kdbus_dir = kobject_create_and_add(KBUILD_MODNAME, fs_kobj);
- if (!kdbus_dir)
- return -ENOMEM;
+ ret = sysfs_create_mount_point(fs_kobj, KBUILD_MODNAME);
+ if (ret)
+ return ret;
ret = kdbus_fs_init();
if (ret < 0) {
@@ -96,14 +93,14 @@ static int __init kdbus_init(void)
return 0;
exit_dir:
- kobject_put(kdbus_dir);
+ sysfs_remove_mount_point(fs_kobj, KBUILD_MODNAME);
return ret;
}
static void __exit kdbus_exit(void)
{
kdbus_fs_exit();
- kobject_put(kdbus_dir);
+ sysfs_remove_mount_point(fs_kobj, KBUILD_MODNAME);
ida_destroy(&kdbus_node_ida);
}
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | David Herrmann <dh.herrmann@gmail.com> |
|---|---|
| Date | 2015-08-17 19:30 +0200 |
| Message-ID | <pYwop-5xk-9@gated-at.bofh.it> |
| In reply to | #1207536 |
Hi
On Fri, Aug 14, 2015 at 3:21 PM, Lubomir Rintel <lkundrak@v3.sk> wrote:
> Since 0cbee99269 user-namespace pull, if a kdbusfs is mounted on a
> location that's not created with sysfs_create_mount_point the user
> namespaces are not allowed to mount their sysfs instances.
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
> Applies on top of char-misc/kdbus a36324913.
This does not apply on top of char-misc/kdbus. The tree lacks the
necessary commits. But yeah, it's required for 4.2. I'll keep it
starred until Greg back-merges 4.2.
Anyway, this is still: Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Thanks!
David
> ipc/kdbus/main.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/ipc/kdbus/main.c b/ipc/kdbus/main.c
> index 1ad4dc8..c2117ea 100644
> --- a/ipc/kdbus/main.c
> +++ b/ipc/kdbus/main.c
> @@ -75,16 +75,13 @@
> * '» struct kdbus_ep *ep (owned)
> */
>
> -/* kdbus mount-point /sys/fs/kdbus */
> -static struct kobject *kdbus_dir;
> -
> static int __init kdbus_init(void)
> {
> int ret;
>
> - kdbus_dir = kobject_create_and_add(KBUILD_MODNAME, fs_kobj);
> - if (!kdbus_dir)
> - return -ENOMEM;
> + ret = sysfs_create_mount_point(fs_kobj, KBUILD_MODNAME);
> + if (ret)
> + return ret;
>
> ret = kdbus_fs_init();
> if (ret < 0) {
> @@ -96,14 +93,14 @@ static int __init kdbus_init(void)
> return 0;
>
> exit_dir:
> - kobject_put(kdbus_dir);
> + sysfs_remove_mount_point(fs_kobj, KBUILD_MODNAME);
> return ret;
> }
>
> static void __exit kdbus_exit(void)
> {
> kdbus_fs_exit();
> - kobject_put(kdbus_dir);
> + sysfs_remove_mount_point(fs_kobj, KBUILD_MODNAME);
> ida_destroy(&kdbus_node_ida);
> }
>
> --
> 2.4.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Josh Boyer <jwboyer@fedoraproject.org> |
|---|---|
| Date | 2015-08-17 23:00 +0200 |
| Message-ID | <pYzFE-1GH-9@gated-at.bofh.it> |
| In reply to | #1208737 |
On Mon, Aug 17, 2015 at 1:23 PM, David Herrmann <dh.herrmann@gmail.com> wrote: > Hi > > On Fri, Aug 14, 2015 at 3:21 PM, Lubomir Rintel <lkundrak@v3.sk> wrote: >> Since 0cbee99269 user-namespace pull, if a kdbusfs is mounted on a >> location that's not created with sysfs_create_mount_point the user >> namespaces are not allowed to mount their sysfs instances. >> >> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> >> --- >> Applies on top of char-misc/kdbus a36324913. > > This does not apply on top of char-misc/kdbus. The tree lacks the > necessary commits. But yeah, it's required for 4.2. I'll keep it > starred until Greg back-merges 4.2. > > Anyway, this is still: Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Grumble. Keeping track of this is getting to be somewhat of a pain. Why isn't the kdbus-next branch already at 4.2? So if one was carrying the contents of char-misc/kdbus as stand-alone patches on top of 4.2-rc7, should your Reviewed-by count as "yes, apply this patch in that instance?" josh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web