projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1daeaa3
)
x86/mm/fault: Use TASK_SIZE_MAX in is_prefetch()
author
Andy Lutomirski
<
[email protected]
>
Thu, 19 Mar 2015 01:33:27 +0000
(18:33 -0700)
committer
Ingo Molnar
<
[email protected]
>
Mon, 23 Mar 2015 09:08:20 +0000
(10:08 +0100)
This is slightly shorter and slightly faster. It's also more
correct: the split between user and kernel addresses is
TASK_SIZE_MAX, regardless of ti->flags.
Signed-off-by: Andy Lutomirski <
[email protected]
>
Cc: Borislav Petkov <
[email protected]
>
Cc: Brad Spengler <
[email protected]
>
Cc: Denys Vlasenko <
[email protected]
>
Cc: H. Peter Anvin <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Link:
http://lkml.kernel.org/r/09156b63bad90a327827003c9e53faa82ef4c56e.1426728647.git.luto@kernel.org
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/mm/fault.c
patch
|
blob
|
history
diff --git
a/arch/x86/mm/fault.c
b/arch/x86/mm/fault.c
index ede025fb46f137ed7576cd5a06547264356c25b0..ae340d3761ca980b35ee2c9e07eac5e2757c0200 100644
(file)
--- a/
arch/x86/mm/fault.c
+++ b/
arch/x86/mm/fault.c
@@
-148,7
+148,7
@@
is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr)
instr = (void *)convert_ip_to_linear(current, regs);
max_instr = instr + 15;
- if (user_mode(regs) && instr >= (unsigned char *)TASK_SIZE)
+ if (user_mode(regs) && instr >= (unsigned char *)TASK_SIZE
_MAX
)
return 0;
while (instr < max_instr) {