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:
Doug Rabson 2001-10-12 11:49:11 +00:00
parent 602150cc70
commit 5b341f5baf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84839

View file

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