]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
asmlinkage_protect sys_io_getevents
authorRoland McGrath <roland@redhat.com>
Thu, 10 Apr 2008 22:38:45 +0000 (15:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Apr 2008 00:28:26 +0000 (17:28 -0700)
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>
fs/aio.c

index 6af92194062266d842adfd57cf8abff425bd6ec5..60a4cd4d11376a3688f822d3ce30798717833a19 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1790,6 +1790,7 @@ asmlinkage long sys_io_getevents(aio_context_t ctx_id,
                put_ioctx(ioctx);
        }
 
+       asmlinkage_protect(5, ret, ctx_id, min_nr, nr, events, timeout);
        return ret;
 }