diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-06-25 09:27:27 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-06-25 09:27:27 -0400 |
commit | 38b22b6e9f46ab8f73ef5734f0e0a000766a9258 (patch) | |
tree | 2ccc41ef55918d3af43e444bde7648562a031559 /arch/x86_64/mm/fault.c | |
parent | 3357d4c75f1fb67e7304998c4ad4e9a9fed66fa4 (diff) | |
parent | b3e112bcc19abd8e9657dca34a87316786e096f3 (diff) |
Automerge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'arch/x86_64/mm/fault.c')
-rw-r--r-- | arch/x86_64/mm/fault.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index 57d3ab15a5c7..2f187986f940 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -74,7 +74,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
74 | instr = (unsigned char *)convert_rip_to_linear(current, regs); | 74 | instr = (unsigned char *)convert_rip_to_linear(current, regs); |
75 | max_instr = instr + 15; | 75 | max_instr = instr + 15; |
76 | 76 | ||
77 | if ((regs->cs & 3) != 0 && instr >= (unsigned char *)TASK_SIZE) | 77 | if (user_mode(regs) && instr >= (unsigned char *)TASK_SIZE) |
78 | return 0; | 78 | return 0; |
79 | 79 | ||
80 | while (scan_more && instr < max_instr) { | 80 | while (scan_more && instr < max_instr) { |
@@ -106,7 +106,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
106 | /* Could check the LDT for lm, but for now it's good | 106 | /* Could check the LDT for lm, but for now it's good |
107 | enough to assume that long mode only uses well known | 107 | enough to assume that long mode only uses well known |
108 | segments or kernel. */ | 108 | segments or kernel. */ |
109 | scan_more = ((regs->cs & 3) == 0) || (regs->cs == __USER_CS); | 109 | scan_more = (!user_mode(regs)) || (regs->cs == __USER_CS); |
110 | break; | 110 | break; |
111 | 111 | ||
112 | case 0x60: | 112 | case 0x60: |