OSDN Git Service

x86/mpx: Use compatible types in comparison to fix sparse error
authorTobias Klauser <tklauser@distanz.ch>
Thu, 12 Jan 2017 15:53:11 +0000 (16:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:40:25 +0000 (14:40 +0200)
commit48131dd0f2b19dd297147c23dc634432fecee638
treeaac5227a9957ee40522f0f084f82fdc1243a6e2e
parent283994074501393b67590220ec8015f60ee670a8
x86/mpx: Use compatible types in comparison to fix sparse error

[ Upstream commit 453828625731d0ba7218242ef6ec88f59408f368 ]

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 <tklauser@distanz.ch>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/mm/mpx.c