+ namespaces-utsname-implement-clone_newuts-flag-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     utsname namespace : fix unshare when CONFIG_UTS_NS is not set

has been added to the -mm tree.  Its filename is

     namespaces-utsname-implement-clone_newuts-flag-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: utsname namespace : fix unshare when CONFIG_UTS_NS is not set
From: Cedric Le Goater <clg@xxxxxxxxxx>

If the kernel is not configured with the CONFIG_UTS_NS, unshare of ipc
namespace will fail and return -EINVAL.

The patch changes the dummy unshare_utsname() to check the clone flags
before returning.

Signed-off-by: Cedric Le Goater <clg@xxxxxxxxxx>
Cc: Serge E. Hallyn <serue@xxxxxxxxxx>
Cc: Kirill Korotaev <dev@xxxxxxxxxx>
Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Cc: Herbert Poetzl <herbert@xxxxxxxxxxxx>
Cc: Andrey Savochkin <saw@xxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/utsname.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN include/linux/utsname.h~namespaces-utsname-implement-clone_newuts-flag-fix include/linux/utsname.h
--- a/include/linux/utsname.h~namespaces-utsname-implement-clone_newuts-flag-fix
+++ a/include/linux/utsname.h
@@ -60,8 +60,12 @@ static inline void put_uts_ns(struct uts
 static inline int unshare_utsname(unsigned long unshare_flags,
 			struct uts_namespace **new_uts)
 {
-	return -EINVAL;
+	if (unshare_flags & CLONE_NEWUTS)
+		return -EINVAL;
+
+	return 0;
 }
+
 static inline int copy_utsname(int flags, struct task_struct *tsk)
 {
 	return 0;
_

Patches currently in -mm which might be from clg@xxxxxxxxxx are

kthread-drivers-base-firmware_classc.patch
pidspace-is_init.patch
pids-coding-style-use-struct-pidmap.patch
move-pidmap-to-pspaceh.patch
move-pidmap-to-pspaceh-fix.patch
define-struct-pspace.patch
update-mq_notify-to-use-a-struct-pid.patch
s390-update-fs3270-to-use-a-struct-pid.patch
namespaces-utsname-switch-to-using-uts-namespaces.patch
namespaces-utsname-implement-clone_newuts-flag-fix.patch
ipc-namespace-core.patch
ipc-namespace-utils.patch
statistics-replace-inode-ugeneric_ip-with-i_private.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux