aboutsummaryrefslogtreecommitdiff
path: root/fs/adfs
diff options
context:
space:
mode:
authorLinus Torvalds2015-01-06 13:00:05 -0800
committerLinus Torvalds2015-01-06 13:00:05 -0800
commitfee7e49d45149fba60156f5b59014f764d3e3728 (patch)
tree002f1613fbaec50a2637abb0777128c3830fced7 /fs/adfs
parentb1940cd21c0f4abdce101253e860feff547291b0 (diff)
mm: propagate error from stack expansion even for guard page
Jay Foad reports that the address sanitizer test (asan) sometimes gets confused by a stack pointer that ends up being outside the stack vma that is reported by /proc/maps. This happens due to an interaction between RLIMIT_STACK and the guard page: when we do the guard page check, we ignore the potential error from the stack expansion, which effectively results in a missing guard page, since the expected stack expansion won't have been done. And since /proc/maps explicitly ignores the guard page (commit d7824370e263: "mm: fix up some user-visible effects of the stack guard page"), the stack pointer ends up being outside the reported stack area. This is the minimal patch: it just propagates the error. It also effectively makes the guard page part of the stack limit, which in turn measn that the actual real stack is one page less than the stack limit. Let's see if anybody notices. We could teach acct_stack_growth() to allow an extra page for a grow-up/grow-down stack in the rlimit test, but I don't want to add more complexity if it isn't needed. Reported-and-tested-by: Jay Foad <jay.foad@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/adfs')
0 files changed, 0 insertions, 0 deletions