From: Andrey Ryabinin <[email protected]>

It seems that 'struct task_struct' not initialized to zero after
allocation. Thus we need to initialize alloc_lat explicitly.

https://jira.sw.ru/browse/PSBM-81395
Signed-off-by: Andrey Ryabinin <[email protected]>
Reviewed-by: Kirill Tkhai <[email protected]>

(cherry-picked from 82ddc4c43f2d97c5c0d009072e5b06acf3f3a241)
Signed-off-by: Andrey Zhadchenko <[email protected]>
---
 kernel/fork.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index c996de5..61175de 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -919,6 +919,10 @@ static struct task_struct *dup_task_struct(struct 
task_struct *orig, int node)
        if (orig->cpus_ptr == &orig->cpus_mask)
                tsk->cpus_ptr = &tsk->cpus_mask;
 
+#ifdef CONFIG_VE
+       memset(tsk->alloc_lat, 0, sizeof(tsk->alloc_lat));
+#endif
+
        /*
         * One for the user space visible state that goes away when reaped.
         * One for the scheduler.
-- 
1.8.3.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to