Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210943
b: refs/heads/master
c: a05c4e1
h: refs/heads/master
i:
  210941: 30e7d0c
  210939: 2a6034b
  210935: 1add4aa
  210927: 007807a
  210911: 9722796
  210879: b04e361
  210815: 2af6978
  210687: a679049
  210431: 45cf26c
  209919: 9cf3cd8
  208895: b84e94a
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Sep 24, 2010
1 parent 6c89a2d commit a9c5b84
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a748102430f4dbbfca3ff81ac12db6e4f1243677
refs/heads/master: a05c4e1d669d09faa90ce7b22646ad1a4b0de3ff
23 changes: 13 additions & 10 deletions trunk/arch/m32r/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
return (void __user *)((sp - frame_size) & -8ul);
}

static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *set, struct pt_regs *regs)
{
struct rt_sigframe __user *frame;
Expand Down Expand Up @@ -244,17 +244,18 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
current->comm, current->pid, frame, regs->pc);
#endif

return;
return 0;

give_sigsegv:
force_sigsegv(sig, current);
return -EFAULT;
}

/*
* OK, we're invoking a handler
*/

static void
static int
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *oldset, struct pt_regs *regs)
{
Expand Down Expand Up @@ -287,22 +288,24 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
}

/* Set up the stack frame */
setup_rt_frame(sig, ka, info, oldset, regs);
if (setup_rt_frame(sig, ka, info, oldset, regs))
return -EFAULT;

spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
return 0;
}

/*
* Note that 'init' is a special process: it doesn't get signals it doesn't
* want to handle. Thus you cannot kill init even with a SIGKILL even by
* mistake.
*/
static int do_signal(struct pt_regs *regs)
static void do_signal(struct pt_regs *regs)
{
siginfo_t info;
int signr;
Expand All @@ -317,7 +320,7 @@ static int do_signal(struct pt_regs *regs)
* if so.
*/
if (!user_mode(regs))
return 1;
return;

if (try_to_freeze())
goto no_signal;
Expand All @@ -336,9 +339,10 @@ static int do_signal(struct pt_regs *regs)
*/

/* Whee! Actually deliver the signal. */
handle_signal(signr, &ka, &info, oldset, regs);
clear_thread_flag(TIF_RESTORE_SIGMASK);
return 1;
if (handle_signal(signr, &ka, &info, oldset, regs) == 0)
clear_thread_flag(TIF_RESTORE_SIGMASK);

return;
}

no_signal:
Expand Down Expand Up @@ -370,7 +374,6 @@ static int do_signal(struct pt_regs *regs)
clear_thread_flag(TIF_RESTORE_SIGMASK);
sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
}
return 0;
}

/*
Expand Down

0 comments on commit a9c5b84

Please sign in to comment.