diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 11:57:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 11:57:53 +0100 |
commit | a47b66da0380dd1ebcf2fbfa5fc41c4b6af8a460 (patch) | |
tree | 3e1e18183f2041d534a1a763af95df1ec460e044 /kernel/pid_namespace.c | |
parent | 1129d270cbfbb7e2b1ec3dede4a13930bdd10e41 (diff) | |
parent | 49def1853334396f948dcb4cedb9347abb318df5 (diff) |
Merge 4.10-rc4 into usb-next
We need the USB fixes in here to make merges easier/possible with the
other sub-maintainer USB trees.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/pid_namespace.c')
-rw-r--r-- | kernel/pid_namespace.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index df9e8e9e0be7..eef2ce968636 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -151,8 +151,12 @@ out: static void delayed_free_pidns(struct rcu_head *p) { - kmem_cache_free(pid_ns_cachep, - container_of(p, struct pid_namespace, rcu)); + struct pid_namespace *ns = container_of(p, struct pid_namespace, rcu); + + dec_pid_namespaces(ns->ucounts); + put_user_ns(ns->user_ns); + + kmem_cache_free(pid_ns_cachep, ns); } static void destroy_pid_namespace(struct pid_namespace *ns) @@ -162,8 +166,6 @@ static void destroy_pid_namespace(struct pid_namespace *ns) ns_free_inum(&ns->ns); for (i = 0; i < PIDMAP_ENTRIES; i++) kfree(ns->pidmap[i].page); - dec_pid_namespaces(ns->ucounts); - put_user_ns(ns->user_ns); call_rcu(&ns->rcu, delayed_free_pidns); } |