Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28993
b: refs/heads/master
c: 19964fe
h: refs/heads/master
i:
  28991: cd9ed21
v: v3
  • Loading branch information
Chuck Ebbert authored and Linus Torvalds committed Jun 23, 2006
1 parent f30f0c0 commit bc88421
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 110cb1d2e343443c4a4b5f7e081928aa4da90f93
refs/heads/master: 19964fecf25c17f865dec07ae242b1a40ea93f16
11 changes: 7 additions & 4 deletions trunk/arch/i386/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@ static inline unsigned long get_segment_eip(struct pt_regs *regs,
unsigned seg = regs->xcs & 0xffff;
u32 seg_ar, seg_limit, base, *desc;

/* Unlikely, but must come before segment checks. */
if (unlikely(regs->eflags & VM_MASK)) {
base = seg << 4;
*eip_limit = base + 0xffff;
return base + (eip & 0xffff);
}

/* The standard kernel/user address space limit. */
*eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg;

/* Unlikely, but must come before segment checks. */
if (unlikely((regs->eflags & VM_MASK) != 0))
return eip + (seg << 4);

/* By far the most common cases. */
if (likely(seg == __USER_CS || seg == __KERNEL_CS))
Expand Down

0 comments on commit bc88421

Please sign in to comment.