login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
14
Re: [PATCH] Fix UTS corruption during clone(CLONE_NEWUTS)
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Serge E. Hallyn <serge@...>
To: Alexey Dobriyan <adobriyan@...>
Cc: <akpm@...>, <linux-kernel@...>, <devel@...>
Subject:
Re: [PATCH] Fix UTS corruption during clone(CLONE_NEWUTS)
Date: Friday, September 14, 2007 - 4:02 pm
Quoting Alexey Dobriyan (
adobriyan@sw.ru
):
quoted text
> struct utsname is copied from master one without any exclusion. > > Here is sample output from one proggie doing > > sethostname("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); > sethostname("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); > > and another > > clone(,, CLONE_NEWUTS, ...) > uname() > > > hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaabbbbb' > hostname = 'bbbaaaaaaaaaaaaaaaaaaaaaaaaaaa' > hostname = 'aaaaaaaabbbbbbbbbbbbbbbbbbbbbb' > hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaaabbbb' > hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaabb' > hostname = 'aaabbbbbbbbbbbbbbbbbbbbbbbbbbb' > hostname = 'bbbbbbbbbbbbbbbbaaaaaaaaaaaaaa' > > Hostname is sometimes corrupted. > > Yes, even _the_ simplest namespace activity had bug in it. :-( > > Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
picking my jaw up off the floor just long enough to type Signed-off-by: Serge Hallyn <serue@us.ibm.com> and limp away in shame thanks Alexey, -serge
quoted text
> --- > > kernel/utsname.c | 2 ++ > 1 file changed, 2 insertions(+) > > --- a/kernel/utsname.c > +++ b/kernel/utsname.c > @@ -28,7 +28,9 @@ static struct uts_namespace *clone_uts_ns(struct uts_namespace *old_ns) > if (!ns) > return ERR_PTR(-ENOMEM); > > + down_read(&uts_sem); > memcpy(&ns->name, &old_ns->name, sizeof(ns->name)); > + up_read(&uts_sem); > kref_init(&ns->kref); > return ns; > } > > - > 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/
-
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] Fix UTS corruption during clone(CLONE_NEWUTS)
, Alexey Dobriyan
, (Fri Sep 14, 10:57 am)
Re: [PATCH] Fix UTS corruption during clone(CLONE_NEWUTS)
, Serge E. Hallyn
, (Fri Sep 14, 4:02 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Linus Torvalds
Re: LSM conversion to static interface
Ingo Molnar
[patch 03/13] syslets: generic kernel bits
Ingo Molnar
Re: [PATCH 6/6] sched: disabled rt-bandwidth by default
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Gregory Haskins
[RFC PATCH 00/17] virtual-bus
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
1020 guests
online.
Online users
Jeremy
wholesalejim
odl005
Syndicate