[Devel,RHEL7,COMMIT] ve: add one more SHUTDOWN hook chain

Submitted by Konstantin Khorenko on April 22, 2017, 11:47 a.m.

Details

Message ID 201704221147.v3MBl6xf028285@finist_cl7.x64_64.work.ct
State New
Series "Fix VEIP object handling on container destroy"
Headers show

Commit Message

Konstantin Khorenko April 22, 2017, 11:47 a.m.
The commit is pushed to "branch-rh7-3.10.0-514.16.1.vz7.30.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.16.1.vz7.30.4
------>
commit 7233fbbbb57eca05be6aab1babc8468e85e4ff29
Author: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Date:   Sat Apr 22 15:47:06 2017 +0400

    ve: add one more SHUTDOWN hook chain
    
    It will be used to release VEIP object.
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 include/linux/ve_proto.h | 1 +
 kernel/ve/ve.c           | 2 ++
 2 files changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/include/linux/ve_proto.h b/include/linux/ve_proto.h
index d2dc12d2..02f35e2 100644
--- a/include/linux/ve_proto.h
+++ b/include/linux/ve_proto.h
@@ -55,6 +55,7 @@  extern int nr_threads_ve(struct ve_struct *ve);
 
 enum {
 	VE_SS_CHAIN,
+	VE_SHUTDOWN_CHAIN,
 
 	VE_MAX_CHAINS
 };
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index d6bd70d..7cb47fa 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -452,6 +452,8 @@  static void ve_drop_context(struct ve_struct *ve)
 	synchronize_rcu();
 	put_nsproxy(ve_ns);
 
+	ve_hook_iterate_fini(VE_SHUTDOWN_CHAIN, ve);
+
 	put_cred(ve->init_cred);
 	ve->init_cred = NULL;