HomeFreeBSD

In exception_return(), test for usermode before testing the IPL to see if
rS75562Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

In exception_return(), test for usermode before testing the IPL to see if
we should call ast(). This allows us to branch to a separate Lkernelret
label so we can fixup the saved t7 register in the trapframe. Otherwise
we can run into a problem on SMP systems where a process is interrupted by
a trap or interrupt on one CPU, migrates to another CPU, and then returns
with the t7 in the stack clobbering the CPU's t7. As a result, two CPU's
would both point to the same per-CPU data and things would go downhill from
there.

Sleuthing help by: gallatin

Details

Provenance
jhbAuthored on
Parents
rS75561: - Stop other CPU's in the SMP case when we enter ddb.
Branches
Unknown
Tags
Unknown

Event Timeline