From 243c65302299a1d1ee4f7b88336af41a9ba605c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Tue, 15 Jun 2010 18:36:13 +0000 Subject: [PATCH] fix softlock problems that causes kernel panics, oscar goes to Daniel :) --- delta-killperm-fix01.diff | 44 +++++++++++++++++++++++++++++++++++++++ kernel-2.6.spec | 2 ++ 2 files changed, 46 insertions(+) create mode 100644 delta-killperm-fix01.diff diff --git a/delta-killperm-fix01.diff b/delta-killperm-fix01.diff new file mode 100644 index 000000000..d1da3b295 --- /dev/null +++ b/delta-killperm-fix01.diff @@ -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)) + /* diff --git a/kernel-2.6.spec b/kernel-2.6.spec index 95bbe2c33..b7a0b039b 100644 --- a/kernel-2.6.spec +++ b/kernel-2.6.spec @@ -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 -- 2.47.0