aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorDaniel Glöckner <[email protected]>2009-03-04 19:42:27 +0100
committerIngo Molnar <[email protected]>2009-03-04 20:33:16 +0100
commitab9e18587f4cdb5f3fb3854c732f27a36f98e8f6 (patch)
treeb8d77d5fbdbdf919e4c0134762ff36ef11626802 /net/lapb/lapb_iface.c
parentdd39ecf522ba86c70809715af46e6557f6491131 (diff)
x86, math-emu: fix init_fpu for task != current
Impact: fix math-emu related crash while using GDB/ptrace init_fpu() calls finit to initialize a task's xstate, while finit always works on the current task. If we use PTRACE_GETFPREGS on another process and both processes did not already use floating point, we get a null pointer exception in finit. This patch creates a new function finit_task that takes a task_struct parameter. finit becomes a wrapper that simply calls finit_task with current. On the plus side this avoids many calls to get_current which would each resolve to an inline assembler mov instruction. An empty finit_task has been added to i387.h to avoid linker errors in case the compiler still emits the call in init_fpu when CONFIG_MATH_EMULATION is not defined. The declaration of finit in i387.h has been removed as the remaining code using this function gets its prototype from fpu_proto.h. Signed-off-by: Daniel Glöckner <[email protected]> Cc: Suresh Siddha <[email protected]> Cc: "Pallipadi Venkatesh" <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Bill Metzenthen <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions