diff options
author | Dan Carpenter <[email protected]> | 2017-08-18 13:30:30 +0300 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-08-29 11:55:15 +0200 |
commit | eaa2f87c6b840b83827c40db6eb8481689570259 (patch) | |
tree | 93449daec7e592149122d621150d06cb79ef6baf /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | 9c3a815f471a84811cf8021cf64aae3b8081dfde (diff) |
x86/ldt: Fix off by one in get_segment_base()
ldt->entries[] is allocated in alloc_ldt_struct(). It has
ldt->nr_entries elements and ldt->nr_entries is capped at LDT_ENTRIES.
So if "idx" is == ldt->nr_entries then we're reading beyond the end of
the buffer. It seems duplicative to have two limit checks when one
would work just as well so I removed the check against LDT_ENTRIES.
The gdt_page.gdt[] array has GDT_ENTRIES entries.
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Andy Lutomirski <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Fixes: d07bdfd322d3 ("perf/x86: Fix USER/KERNEL tagging of samples properly")
Link: http://lkml.kernel.org/r/20170818102516.gqwm4xdvvuvjw5ho@mwanda
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions