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>
This commit is contained in:
Roland McGrath 2008-04-10 15:38:45 -07:00 коммит произвёл Linus Torvalds
Родитель 54a0151041
Коммит 598af051a7
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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;
}