mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
userns: Disassociate user_struct from the user_namespace.
Modify alloc_uid to take a kuid and make the user hash table global. Stop holding a reference to the user namespace in struct user_struct. This simplifies the code and makes the per user accounting not care about which user namespace a uid happens to appear in. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
parent
5673a94c14
commit
7b44ab978b
6 changed files with 55 additions and 43 deletions
|
@ -6,12 +6,8 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 7)
|
||||
#define UIDHASH_SZ (1 << UIDHASH_BITS)
|
||||
|
||||
struct user_namespace {
|
||||
struct kref kref;
|
||||
struct hlist_head uidhash_table[UIDHASH_SZ];
|
||||
struct user_namespace *parent;
|
||||
struct user_struct *creator;
|
||||
struct work_struct destroyer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue