mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
uts: create "struct uts_namespace" from kmem_cache
So "struct uts_namespace" can enjoy fine-grained SLAB debugging and usercopy protection. I'd prefer shorter name "utsns" but there is "user_namespace" already. Link: http://lkml.kernel.org/r/20180228215158.GA23146@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Serge Hallyn <serge@hallyn.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
bc4f2f5469
commit
3ea056c504
3 changed files with 24 additions and 4 deletions
|
@ -44,6 +44,8 @@ static inline void put_uts_ns(struct uts_namespace *ns)
|
|||
{
|
||||
kref_put(&ns->kref, free_uts_ns);
|
||||
}
|
||||
|
||||
void uts_ns_init(void);
|
||||
#else
|
||||
static inline void get_uts_ns(struct uts_namespace *ns)
|
||||
{
|
||||
|
@ -61,6 +63,10 @@ static inline struct uts_namespace *copy_utsname(unsigned long flags,
|
|||
|
||||
return old_ns;
|
||||
}
|
||||
|
||||
static inline void uts_ns_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROC_SYSCTL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue