Commit 598af051a79d05b751fe793f1fe09fcf74763e02

Authored by Roland McGrath
Committed by Linus Torvalds
1 parent 54a0151041

asmlinkage_protect sys_io_getevents

Use asmlinkage_protect in sys_io_getevents, because GCC for i386 with
CONFIG_FRAME_POINTER=n can decide to clobber an argument word on the
stack, i.e. the user struct pt_regs.  Here the problem is not a tail
call, but just the compiler's use of the stack when it inlines and
optimizes the body of the called function.  This seems to avoid it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -1790,6 +1790,7 @@
1790 1790 put_ioctx(ioctx);
1791 1791 }
1792 1792  
  1793 + asmlinkage_protect(5, ret, ctx_id, min_nr, nr, events, timeout);
1793 1794 return ret;
1794 1795 }
1795 1796