fpu_memcpy with SMP.. found the problem

Michael L. Galbraith (mikeg@weiden.de)
Sun, 3 May 1998 17:05:53 +0200 (MET DST)

On Sat, 2 May 1998, some dodo wrote:

> I'm exploring a problem with fpu_memcpy causing int 13 in SMP mode
> on my UP machine. I've replaced the fsave->fnsave and friends, but
> the problem persists. I've checked for, but not found, any other
> opcodes with fn variants.


> Now, what I notice is that the interrupt _only_ happens inside kswapd.


> Or, am I barking up the wrong tree?

wrong forest :)

I found the problem. last_task_used_math is only initialised to
something other than NULL in UP mode. However, it is still used in
SMP mode in these functions.. copy_thread, exit_thread, dump_fpu,
sys_ptrace and DO_ERROR.

Moving last_task_used_math = current; outside of the #ifdef __SMP__
in math_restore_state() cures the problem, but doesn't look like the
correct thing to do when compared to what is done elsewhere.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu