mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
time: Add timens_offsets to be used for tasks in time namespace
Introduce offsets for time namespace. They will contain an adjustment needed to convert clocks to/from host's. A new namespace is created with the same offsets as the time namespace of the current process. Co-developed-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@openvz.org> Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20191112012724.250792-5-dima@arista.com
This commit is contained in:
committed by
Thomas Gleixner
parent
769071ac9f
commit
af993f58d6
@@ -14,6 +14,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/cred.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
static struct ucounts *inc_time_namespaces(struct user_namespace *ns)
|
||||
{
|
||||
@@ -60,6 +61,7 @@ static struct time_namespace *clone_time_ns(struct user_namespace *user_ns,
|
||||
ns->ucounts = ucounts;
|
||||
ns->ns.ops = &timens_operations;
|
||||
ns->user_ns = get_user_ns(user_ns);
|
||||
ns->offsets = old_ns->offsets;
|
||||
return ns;
|
||||
|
||||
fail_free:
|
||||
|
Reference in New Issue
Block a user