[Devel,5/6] ve: add one more SHUTDOWN hooks chain

Submitted by Stanislav Kinsburskiy on April 21, 2017, 3:04 p.m.

Details

Message ID 20170421150442.31147.97711.stgit@localhost.localdomain
State New
Series "Fix VEIP object handling on container destroy"
Headers show

Commit Message

Stanislav Kinsburskiy April 21, 2017, 3:04 p.m.
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 d2dc12d..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;