]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-vserver-fixes.patch
- rel 2; fixed strace inside guest (caused lockup in yama); from upstream@daniel_hozac
[packages/kernel.git] / kernel-vserver-fixes.patch
1 --- linux-3.3/fs/proc/base.c~   2012-03-19 21:44:42.000000000 +0100
2 +++ linux-3.3/fs/proc/base.c    2012-03-21 12:25:28.051092423 +0100
3 @@ -568,6 +568,8 @@
4                                  struct task_struct *task,
5                                  int hide_pid_min)
6  {
7 +       if (vx_check(0, VS_WATCH_P))
8 +               return true;
9         if (pid->hide_pid < hide_pid_min)
10                 return true;
11         if (in_group_p(pid->pid_gid))
12 --- linux-4.1.3-vs2.3.8.2/kernel/signal.c       2015-09-20 20:06:03.000000000 +0200
13 +++ testing41/kernel/signal.c   2015-12-05 13:01:00.599373873 +0100
14 @@ -1369,8 +1369,14 @@
15         for (;;) {
16                 rcu_read_lock();
17                 p = pid_task(pid, PIDTYPE_PID);
18 -               if (p && vx_check(vx_task_xid(p), VS_IDENT))
19 -                       error = group_send_sig_info(sig, info, p);
20 +               if (p) {
21 +                       if (vx_check(vx_task_xid(p), VS_IDENT))
22 +                               error = group_send_sig_info(sig, info, p);
23 +                       else {
24 +                               rcu_read_unlock();
25 +                               return -ESRCH;
26 +                       }
27 +               }
28                 rcu_read_unlock();
29                 if (likely(!p || error != -ESRCH))
30                         return error;
31 --- linux-4.1.3-vs2.3.8.2/kernel/exit.c 2015-09-20 20:06:03.000000000 +0200
32 +++ testing41/kernel/exit.c     2016-01-27 20:50:37.170221605 +0100
33 @@ -580,8 +580,11 @@ static void forget_original_parent(struc
34  
35         reaper = find_new_reaper(father, reaper);
36         list_for_each_entry(p, &father->children, sibling) {
37 +               struct task_struct *this_reaper = reaper;
38 +               if (p == reaper)
39 +                       this_reaper = task_active_pid_ns(reaper)->child_reaper;
40                 for_each_thread(p, t) {
41 -                       t->real_parent = reaper;
42 +                       t->real_parent = this_reaper;
43                         BUG_ON((!t->ptrace) != (t->parent == father));
44                         if (likely(!t->ptrace))
45                                 t->parent = t->real_parent;
46 @@ -593,7 +596,7 @@ static void forget_original_parent(struc
47                  * If this is a threaded reparent there is no need to
48                  * notify anyone anything has happened.
49                  */
50 -               if (!same_thread_group(reaper, father))
51 +               if (!same_thread_group(this_reaper, father))
52                         reparent_leader(father, p, dead);
53         }
54         list_splice_tail_init(&father->children, &reaper->children);
This page took 0.030809 seconds and 3 git commands to generate.