Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306036
b: refs/heads/master
c: bcb8c8d
h: refs/heads/master
v: v3
  • Loading branch information
Matt Fleming authored and Al Viro committed May 22, 2012
1 parent ad9d19f commit 4f4daae
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 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: a12c3694aeb0321d5e6a50321c63881bd92a1bf2
refs/heads/master: bcb8c8d0b7131df1b5aad011db33e17f8def5d0b
31 changes: 18 additions & 13 deletions trunk/arch/microblaze/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, 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 @@ -267,10 +267,11 @@ 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;
}

/* Handle restarting system calls */
Expand Down Expand Up @@ -314,21 +315,25 @@ static int
handle_signal(unsigned long sig, struct k_sigaction *ka,
siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
{
int ret;

/* Set up the stack frame */
if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame(sig, ka, info, oldset, regs);
ret = setup_rt_frame(sig, ka, info, oldset, regs);
else
setup_rt_frame(sig, ka, NULL, oldset, regs);
ret = setup_rt_frame(sig, ka, NULL, oldset, regs);

if (ret)
return ret;

if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,
&current->blocked, &ka->sa.sa_mask);
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 1;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);

return 0;
}

/*
Expand Down Expand Up @@ -369,7 +374,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_syscall)
/* Whee! Actually deliver the signal. */
if (in_syscall)
handle_restart(regs, &ka, 1);
if (handle_signal(signr, &ka, &info, oldset, regs)) {
if (!handle_signal(signr, &ka, &info, oldset, regs)) {
/*
* A signal was successfully delivered; the saved
* sigmask will have been stored in the signal frame,
Expand Down

0 comments on commit 4f4daae

Please sign in to comment.