diff options
Diffstat (limited to 'arch/x86/mm/fault_32.c')
-rw-r--r-- | arch/x86/mm/fault_32.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index c686ae20fd6b..6555c3d14371 100644 --- a/arch/x86/mm/fault_32.c +++ b/arch/x86/mm/fault_32.c | |||
@@ -105,7 +105,7 @@ static inline unsigned long get_segment_eip(struct pt_regs *regs, | |||
105 | LDT and other horrors are only used in user space. */ | 105 | LDT and other horrors are only used in user space. */ |
106 | if (seg & (1<<2)) { | 106 | if (seg & (1<<2)) { |
107 | /* Must lock the LDT while reading it. */ | 107 | /* Must lock the LDT while reading it. */ |
108 | down(¤t->mm->context.sem); | 108 | mutex_lock(¤t->mm->context.lock); |
109 | desc = current->mm->context.ldt; | 109 | desc = current->mm->context.ldt; |
110 | desc = (void *)desc + (seg & ~7); | 110 | desc = (void *)desc + (seg & ~7); |
111 | } else { | 111 | } else { |
@@ -118,7 +118,7 @@ static inline unsigned long get_segment_eip(struct pt_regs *regs, | |||
118 | base = get_desc_base((unsigned long *)desc); | 118 | base = get_desc_base((unsigned long *)desc); |
119 | 119 | ||
120 | if (seg & (1<<2)) { | 120 | if (seg & (1<<2)) { |
121 | up(¤t->mm->context.sem); | 121 | mutex_unlock(¤t->mm->context.lock); |
122 | } else | 122 | } else |
123 | put_cpu(); | 123 | put_cpu(); |
124 | 124 | ||
@@ -539,23 +539,22 @@ no_context: | |||
539 | printk(KERN_ALERT "BUG: unable to handle kernel paging" | 539 | printk(KERN_ALERT "BUG: unable to handle kernel paging" |
540 | " request"); | 540 | " request"); |
541 | printk(" at virtual address %08lx\n",address); | 541 | printk(" at virtual address %08lx\n",address); |
542 | printk(KERN_ALERT " printing eip:\n"); | 542 | printk(KERN_ALERT "printing eip: %08lx ", regs->eip); |
543 | printk("%08lx\n", regs->eip); | ||
544 | 543 | ||
545 | page = read_cr3(); | 544 | page = read_cr3(); |
546 | page = ((__typeof__(page) *) __va(page))[address >> PGDIR_SHIFT]; | 545 | page = ((__typeof__(page) *) __va(page))[address >> PGDIR_SHIFT]; |
547 | #ifdef CONFIG_X86_PAE | 546 | #ifdef CONFIG_X86_PAE |
548 | printk(KERN_ALERT "*pdpt = %016Lx\n", page); | 547 | printk("*pdpt = %016Lx ", page); |
549 | if ((page >> PAGE_SHIFT) < max_low_pfn | 548 | if ((page >> PAGE_SHIFT) < max_low_pfn |
550 | && page & _PAGE_PRESENT) { | 549 | && page & _PAGE_PRESENT) { |
551 | page &= PAGE_MASK; | 550 | page &= PAGE_MASK; |
552 | page = ((__typeof__(page) *) __va(page))[(address >> PMD_SHIFT) | 551 | page = ((__typeof__(page) *) __va(page))[(address >> PMD_SHIFT) |
553 | & (PTRS_PER_PMD - 1)]; | 552 | & (PTRS_PER_PMD - 1)]; |
554 | printk(KERN_ALERT "*pde = %016Lx\n", page); | 553 | printk(KERN_ALERT "*pde = %016Lx ", page); |
555 | page &= ~_PAGE_NX; | 554 | page &= ~_PAGE_NX; |
556 | } | 555 | } |
557 | #else | 556 | #else |
558 | printk(KERN_ALERT "*pde = %08lx\n", page); | 557 | printk("*pde = %08lx ", page); |
559 | #endif | 558 | #endif |
560 | 559 | ||
561 | /* | 560 | /* |
@@ -569,8 +568,10 @@ no_context: | |||
569 | page &= PAGE_MASK; | 568 | page &= PAGE_MASK; |
570 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) | 569 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) |
571 | & (PTRS_PER_PTE - 1)]; | 570 | & (PTRS_PER_PTE - 1)]; |
572 | printk(KERN_ALERT "*pte = %0*Lx\n", sizeof(page)*2, (u64)page); | 571 | printk("*pte = %0*Lx ", sizeof(page)*2, (u64)page); |
573 | } | 572 | } |
573 | |||
574 | printk("\n"); | ||
574 | } | 575 | } |
575 | 576 | ||
576 | tsk->thread.cr2 = address; | 577 | tsk->thread.cr2 = address; |