mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-03 23:28:58 +00:00
If the faulting instruction is a cmpxchg, then isr.w and isr.r will both
be set. We need to check isr.w before isr.r so that we can correctly handle a cmpxchg to a copy-on-write page. This fixes the hang-after-fork problem for dynamically linked programs.
This commit is contained in:
parent
602150cc70
commit
5b341f5baf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84839
|
@ -414,10 +414,10 @@ trap(int vector, int imm, struct trapframe *framep)
|
|||
|
||||
if (framep->tf_cr_isr & IA64_ISR_X)
|
||||
ftype = VM_PROT_EXECUTE;
|
||||
else if (framep->tf_cr_isr & IA64_ISR_R)
|
||||
ftype = VM_PROT_READ;
|
||||
else
|
||||
else if (framep->tf_cr_isr & IA64_ISR_W)
|
||||
ftype = VM_PROT_WRITE;
|
||||
else
|
||||
ftype = VM_PROT_READ;
|
||||
|
||||
va = trunc_page((vm_offset_t)va);
|
||||
|
||||
|
|
Loading…
Reference in a new issue