OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] namespaces: uts_ns: make information visible via /proc/PID/uts directory
Re: [PATCH] namespaces: uts_ns: make information visible via /proc/PID/uts directory [message #3330 is a reply to message #3318] Mon, 22 May 2006 23:07 Go to previous messageGo to previous message
Sam Vilain is currently offline  Sam Vilain
Messages: 73
Registered: February 2006
Member
Alan Cox wrote:

>On Llu, 2006-05-22 at 17:24 +1200, Sam Vilain wrote:
>
>
>>From: Sam Vilain <sam.vilain@catalyst.net.nz>
>>
>>Export the UTS information to a per-process directory /proc/PID/uts,
>>that has individual nodes for hostname, ostype, etc - similar to
>>those in /proc/sys/kernel
>>
>>
>
>Can you explain the locking being used here against the name being
>changed at the same moment ?
>

Is this a test? :-)

Let's see, get_task_pid locks the task struct (so that it doesn't go
away while we're de-referencing the nsproxy and uts_ns etc), and the
kobj references are assumed to be enough to avoid the references
dropping away in the meantime.

I didn't grab uts_sem. That semaphore could be made per-uts_ns, in
theory. Whether anyone cares about contention that much is another
question.

I intended this to be exploratory, it wasn't really mergable. Should
have added an [RFC] tag, sorry about that.

Sam.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 0/9] namespaces: Introduction
Next Topic: [PATCH 1/3] proc: sysctl: rename proc_doutsstring to proc_do_uts_string
Goto Forum:
  


Current Time: Tue Sep 17 15:22:42 GMT 2024

Total time taken to generate the page: 0.05022 seconds