|
@@ -443,8 +443,9 @@ give_sigsegv:
|
|
|
|
|
|
static long
|
|
static long
|
|
handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
|
|
handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
|
|
- sigset_t *oldset, struct pt_regs *regs, int in_syscall)
|
|
|
|
|
|
+ struct pt_regs *regs, int in_syscall)
|
|
{
|
|
{
|
|
|
|
+ sigset_t *oldset = sigmask_to_save();
|
|
DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n",
|
|
DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n",
|
|
sig, ka, info, oldset, regs);
|
|
sig, ka, info, oldset, regs);
|
|
|
|
|
|
@@ -568,28 +569,17 @@ do_signal(struct pt_regs *regs, long in_syscall)
|
|
siginfo_t info;
|
|
siginfo_t info;
|
|
struct k_sigaction ka;
|
|
struct k_sigaction ka;
|
|
int signr;
|
|
int signr;
|
|
- sigset_t *oldset;
|
|
|
|
|
|
|
|
- DBG(1,"\ndo_signal: oldset=0x%p, regs=0x%p, sr7 %#lx, in_syscall=%d\n",
|
|
|
|
- oldset, regs, regs->sr[7], in_syscall);
|
|
|
|
|
|
+ DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n",
|
|
|
|
+ regs, regs->sr[7], in_syscall);
|
|
|
|
|
|
/* Everyone else checks to see if they are in kernel mode at
|
|
/* Everyone else checks to see if they are in kernel mode at
|
|
this point and exits if that's the case. I'm not sure why
|
|
this point and exits if that's the case. I'm not sure why
|
|
we would be called in that case, but for some reason we
|
|
we would be called in that case, but for some reason we
|
|
are. */
|
|
are. */
|
|
|
|
|
|
- if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
|
|
|
- oldset = ¤t->saved_sigmask;
|
|
|
|
- else
|
|
|
|
- oldset = ¤t->blocked;
|
|
|
|
-
|
|
|
|
- DBG(1,"do_signal: oldset %08lx / %08lx\n",
|
|
|
|
- oldset->sig[0], oldset->sig[1]);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/* May need to force signal if handle_signal failed to deliver */
|
|
/* May need to force signal if handle_signal failed to deliver */
|
|
while (1) {
|
|
while (1) {
|
|
-
|
|
|
|
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
|
|
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
|
|
DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]);
|
|
DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]);
|
|
|
|
|
|
@@ -603,8 +593,7 @@ do_signal(struct pt_regs *regs, long in_syscall)
|
|
/* Whee! Actually deliver the signal. If the
|
|
/* Whee! Actually deliver the signal. If the
|
|
delivery failed, we need to continue to iterate in
|
|
delivery failed, we need to continue to iterate in
|
|
this loop so we can deliver the SIGSEGV... */
|
|
this loop so we can deliver the SIGSEGV... */
|
|
- if (handle_signal(signr, &info, &ka, oldset,
|
|
|
|
- regs, in_syscall)) {
|
|
|
|
|
|
+ if (handle_signal(signr, &info, &ka, regs, in_syscall)) {
|
|
DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n",
|
|
DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n",
|
|
regs->gr[28]);
|
|
regs->gr[28]);
|
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
|
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|