* [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns()
@ 2013-01-31 9:28 Yuanhan Liu
2013-01-31 9:28 ` [PATCH 2/3] sysctl: put get/get_uts() into CONFIG_PROC_SYSCTL code block Yuanhan Liu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Yuanhan Liu @ 2013-01-31 9:28 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Yuanhan Liu, Serge Hallyn
Fix the wrong comment about the return value of clone_uts_ns()
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
kernel/utsname.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/utsname.c b/kernel/utsname.c
index 08b197e..a47fc5d 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -30,7 +30,7 @@ static struct uts_namespace *create_uts_ns(void)
/*
* Clone a new ns copying an original utsname, setting refcount to 1
* @old_ns: namespace to clone
- * Return NULL on error (failure to kmalloc), new ns otherwise
+ * Return ERR_PTR(-ENOMEM) on error (failure to kmalloc), new ns otherwise
*/
static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns,
struct uts_namespace *old_ns)
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] sysctl: put get/get_uts() into CONFIG_PROC_SYSCTL code block
2013-01-31 9:28 [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns() Yuanhan Liu
@ 2013-01-31 9:28 ` Yuanhan Liu
2013-01-31 9:28 ` [PATCH 3/3] nsproxy: remove duplicate task_cred_xxx for user_ns Yuanhan Liu
2013-01-31 18:17 ` [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns() Serge E. Hallyn
2 siblings, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2013-01-31 9:28 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Yuanhan Liu
put get/get_uts() into CONFIG_PROC_SYSCTL code block as they are used
only when CONFIG_PROC_SYSCTL is enabled.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
kernel/utsname_sysctl.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index 63da38c..4f69f9a 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -15,6 +15,8 @@
#include <linux/sysctl.h>
#include <linux/wait.h>
+#ifdef CONFIG_PROC_SYSCTL
+
static void *get_uts(ctl_table *table, int write)
{
char *which = table->data;
@@ -38,7 +40,6 @@ static void put_uts(ctl_table *table, int write, void *which)
up_write(&uts_sem);
}
-#ifdef CONFIG_PROC_SYSCTL
/*
* Special case of dostring for the UTS structure. This has locks
* to observe. Should this be in kernel/sys.c ????
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] nsproxy: remove duplicate task_cred_xxx for user_ns
2013-01-31 9:28 [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns() Yuanhan Liu
2013-01-31 9:28 ` [PATCH 2/3] sysctl: put get/get_uts() into CONFIG_PROC_SYSCTL code block Yuanhan Liu
@ 2013-01-31 9:28 ` Yuanhan Liu
2013-01-31 18:16 ` Serge E. Hallyn
2013-01-31 18:17 ` [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns() Serge E. Hallyn
2 siblings, 1 reply; 5+ messages in thread
From: Yuanhan Liu @ 2013-01-31 9:28 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Yuanhan Liu, Serge Hallyn
We can use user_ns, which is also assigned from task_cred_xxx(tsk,
user_ns), at the beginning of copy_namespaces().
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
kernel/nsproxy.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 78e2ecb..b781e66 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -153,8 +153,7 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk)
goto out;
}
- new_ns = create_new_namespaces(flags, tsk,
- task_cred_xxx(tsk, user_ns), tsk->fs);
+ new_ns = create_new_namespaces(flags, tsk, user_ns, tsk->fs);
if (IS_ERR(new_ns)) {
err = PTR_ERR(new_ns);
goto out;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] nsproxy: remove duplicate task_cred_xxx for user_ns
2013-01-31 9:28 ` [PATCH 3/3] nsproxy: remove duplicate task_cred_xxx for user_ns Yuanhan Liu
@ 2013-01-31 18:16 ` Serge E. Hallyn
0 siblings, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2013-01-31 18:16 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: linux-kernel, akpm, Serge Hallyn
Quoting Yuanhan Liu (yuanhan.liu@linux.intel.com):
> We can use user_ns, which is also assigned from task_cred_xxx(tsk,
> user_ns), at the beginning of copy_namespaces().
>
> Cc: Serge Hallyn <serge.hallyn@canonical.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> ---
> kernel/nsproxy.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
> index 78e2ecb..b781e66 100644
> --- a/kernel/nsproxy.c
> +++ b/kernel/nsproxy.c
> @@ -153,8 +153,7 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk)
> goto out;
> }
>
> - new_ns = create_new_namespaces(flags, tsk,
> - task_cred_xxx(tsk, user_ns), tsk->fs);
> + new_ns = create_new_namespaces(flags, tsk, user_ns, tsk->fs);
> if (IS_ERR(new_ns)) {
> err = PTR_ERR(new_ns);
> goto out;
> --
> 1.7.7.6
>
> --
> 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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns()
2013-01-31 9:28 [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns() Yuanhan Liu
2013-01-31 9:28 ` [PATCH 2/3] sysctl: put get/get_uts() into CONFIG_PROC_SYSCTL code block Yuanhan Liu
2013-01-31 9:28 ` [PATCH 3/3] nsproxy: remove duplicate task_cred_xxx for user_ns Yuanhan Liu
@ 2013-01-31 18:17 ` Serge E. Hallyn
2 siblings, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2013-01-31 18:17 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: linux-kernel, akpm, Serge Hallyn
Quoting Yuanhan Liu (yuanhan.liu@linux.intel.com):
> Fix the wrong comment about the return value of clone_uts_ns()
>
> Cc: Serge Hallyn <serge.hallyn@canonical.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> ---
> kernel/utsname.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/utsname.c b/kernel/utsname.c
> index 08b197e..a47fc5d 100644
> --- a/kernel/utsname.c
> +++ b/kernel/utsname.c
> @@ -30,7 +30,7 @@ static struct uts_namespace *create_uts_ns(void)
> /*
> * Clone a new ns copying an original utsname, setting refcount to 1
> * @old_ns: namespace to clone
> - * Return NULL on error (failure to kmalloc), new ns otherwise
> + * Return ERR_PTR(-ENOMEM) on error (failure to kmalloc), new ns otherwise
> */
> static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns,
> struct uts_namespace *old_ns)
> --
> 1.7.7.6
>
> --
> 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/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-31 18:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-31 9:28 [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns() Yuanhan Liu
2013-01-31 9:28 ` [PATCH 2/3] sysctl: put get/get_uts() into CONFIG_PROC_SYSCTL code block Yuanhan Liu
2013-01-31 9:28 ` [PATCH 3/3] nsproxy: remove duplicate task_cred_xxx for user_ns Yuanhan Liu
2013-01-31 18:16 ` Serge E. Hallyn
2013-01-31 18:17 ` [PATCH 1/3] namespaces: utsname: fix wrong comment about clone_uts_ns() Serge E. Hallyn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).