• Arjan van de Ven's avatar
    x86: Simplify bound checks in the MTRR code · 11879ba5
    Arjan van de Ven authored
    The current bound checks for copy_from_user in the MTRR driver are
    not as obvious as they could be, and gcc agrees with that.
    
    This patch simplifies the boundary checks to the point that gcc can
    now prove to itself that the copy_from_user() is never going past
    its bounds.
    Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
    Cc: Yinghai Lu <yinghai@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    LKML-Reference: <20090926205150.30797709@infradead.org>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    11879ba5
if.c 9.85 KB