fix softlock problems that causes kernel panics, oscar goes to Daniel :)
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Tue, 15 Jun 2010 18:36:13 +0000 (18:36 +0000)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Tue, 15 Jun 2010 18:36:13 +0000 (18:36 +0000)
delta-killperm-fix01.diff [new file with mode: 0644]
kernel-2.6.spec

diff --git a/delta-killperm-fix01.diff b/delta-killperm-fix01.diff
new file mode 100644 (file)
index 0000000..d1da3b2
--- /dev/null
@@ -0,0 +1,44 @@
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 76f1f25..23f2fa4 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
+@@ -573,10 +573,11 @@ static int check_kill_permission(int sig, struct siginfo *info,
+       if (!valid_signal(sig))
+               return -EINVAL;
++/*
+       if ((info != SEND_SIG_NOINFO) &&
+               (is_si_special(info) || !SI_FROMUSER(info)))
+               goto skip;
+-
++*/
+       vxdprintk(VXD_CBIT(misc, 7),
+               "check_kill_permission(%d,%p,%p[#%u,%u])",
+               sig, info, t, vx_task_xid(t), t->pid);
+@@ -610,13 +611,17 @@ static int check_kill_permission(int sig, struct siginfo *info,
+               return error;
+       error = -ESRCH;
++      /* FIXME: we shouldn't return ESRCH ever, to avoid
++                loops, maybe ENOENT or EACCES? */
+       if (!vx_check(vx_task_xid(t), VS_WATCH_P | VS_IDENT)) {
+               vxdprintk(current->xid || VXD_CBIT(misc, 7),
+                       "signal %d[%p] xid mismatch %p[#%u,%u] xid=#%u",
+                       sig, info, t, vx_task_xid(t), t->pid, current->xid);
+               return error;
+       }
++/*
+ skip:
++*/
+       return security_task_kill(t, info, sig, 0);
+ }
+@@ -1074,7 +1079,7 @@ int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
+       rcu_read_lock();
+ retry:
+       p = pid_task(pid, PIDTYPE_PID);
+-      if (p && vx_check(vx_task_xid(p), VS_ADMIN | VS_IDENT)) {
++      if (p && vx_check(vx_task_xid(p), VS_IDENT)) {
+               error = group_send_sig_info(sig, info, p);
+               if (unlikely(error == -ESRCH))
+                       /*
index 95bbe2c..b7a0b03 100644 (file)
@@ -157,6 +157,7 @@ Patch100: linux-2.6-100-build-nonintconfig.patch
 Patch200: patch-%{rpmversion}-vs%{vsversion}.diff
 Patch220: delta-ptrace-fix01.diff
 Patch230: delta-pivot-fix01.diff
+Patch240: delta-killperm-fix01.diff
 
 # IP sets
 Patch250: linux-2.6-250-ipsets.patch
@@ -361,6 +362,7 @@ KERNEL_PREVIOUS=vanilla
 %ApplyPatch 200
 %ApplyPatch 220
 %ApplyPatch 230
+%ApplyPatch 240
 
 %ApplyPatch 250