Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79711
b: refs/heads/master
c: 83bd010
h: refs/heads/master
i:
  79709: e7ab36b
  79707: a861994
  79703: 93ff2e0
  79695: 1506c9b
  79679: 8cb61a4
v: v3
  • Loading branch information
Roland McGrath authored and Ingo Molnar committed Jan 30, 2008
1 parent 51cb151 commit 963696a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9fc58910ebc448b0b7d37af1bf57a896a78e9c4
refs/heads/master: 83bd01024b1fdfc41d9b758e5669e80fca72df66
7 changes: 7 additions & 0 deletions trunk/arch/x86/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
/* Default to using normal stack */
esp = regs->esp;

/*
* If we are on the alternate signal stack and would overflow it, don't.
* Return an always-bogus address instead so we will die with SIGSEGV.
*/
if (on_sig_stack(esp) && !likely(on_sig_stack(esp - frame_size)))
return (void __user *) -1L;

/* This is the X/Open sanctioned signal stack switching. */
if (ka->sa.sa_flags & SA_ONSTACK) {
if (sas_ss_flags(esp) == 0)
Expand Down

0 comments on commit 963696a

Please sign in to comment.