]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
x86/ldt: Make all size computations unsigned
authorThomas Gleixner <tglx@linutronix.de>
Fri, 9 Dec 2016 23:13:51 +0000 (00:13 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 9 Dec 2016 23:24:39 +0000 (00:24 +0100)
commit990e9dc381e6999a0eba8ebaf8747daaa8c58337
treee0531b6b297a4361cdca9da4d5f715ec44539c00
parent296dc5806de57dc84fce000d60fc201ba40f96e8
x86/ldt: Make all size computations unsigned

ldt->size can never be negative. The helper functions take 'unsigned int'
arguments which are assigned from ldt->size. The related user space
user_desc struct member entry_number is unsigned as well.

But ldt->size itself and a few local variables which are related to
ldt->size are type 'int' which makes no sense whatsoever and results in
typecasts which make the eyes bleed.

Clean it up and convert everything which is related to ldt->size to
unsigned it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
arch/x86/events/core.c
arch/x86/include/asm/mmu_context.h
arch/x86/kernel/ldt.c