diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-12-10 00:13:51 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-10 00:24:39 +0100 |
commit | 990e9dc381e6999a0eba8ebaf8747daaa8c58337 (patch) | |
tree | e0531b6b297a4361cdca9da4d5f715ec44539c00 /arch/x86/events/core.c | |
parent | 296dc5806de57dc84fce000d60fc201ba40f96e8 (diff) | |
download | blackbird-obmc-linux-990e9dc381e6999a0eba8ebaf8747daaa8c58337.tar.gz blackbird-obmc-linux-990e9dc381e6999a0eba8ebaf8747daaa8c58337.zip |
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>
Diffstat (limited to 'arch/x86/events/core.c')
-rw-r--r-- | arch/x86/events/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 6e395c996900..55e6c8a397c2 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -2299,7 +2299,7 @@ valid_user_frame(const void __user *fp, unsigned long size) static unsigned long get_segment_base(unsigned int segment) { struct desc_struct *desc; - int idx = segment >> 3; + unsigned int idx = segment >> 3; if ((segment & SEGMENT_TI_MASK) == SEGMENT_LDT) { #ifdef CONFIG_MODIFY_LDT_SYSCALL |