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:
695085b
)
x86/mpx: Use compatible types in comparison to fix sparse error
author
Tobias Klauser
<
[email protected]
>
Thu, 12 Jan 2017 15:53:11 +0000
(16:53 +0100)
committer
Ingo Molnar
<
[email protected]
>
Sat, 14 Jan 2017 08:32:06 +0000
(09:32 +0100)
info->si_addr is of type void __user *, so it should be compared against
something from the same address space.
This fixes the following sparse error:
arch/x86/mm/mpx.c:296:27: error: incompatible types in comparison expression (different address spaces)
Signed-off-by: Tobias Klauser <
[email protected]
>
Cc: Dave Hansen <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/mm/mpx.c
patch
|
blob
|
history
diff --git
a/arch/x86/mm/mpx.c
b/arch/x86/mm/mpx.c
index 324e5713d386f0ed235b0394f71c0290df870fae..af59f808742f94df84ab0aaed1ac2db3ea27e016 100644
(file)
--- a/
arch/x86/mm/mpx.c
+++ b/
arch/x86/mm/mpx.c
@@
-293,7
+293,7
@@
siginfo_t *mpx_generate_siginfo(struct pt_regs *regs)
* We were not able to extract an address from the instruction,
* probably because there was something invalid in it.
*/
- if (info->si_addr == (void *)-1) {
+ if (info->si_addr == (void
__user
*)-1) {
err = -EINVAL;
goto err_out;
}