diff options
author | Chris Wilson <[email protected]> | 2020-09-28 22:59:42 +0100 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2020-09-29 12:33:17 +0100 |
commit | b7eeb2b4132ccf1a7d38f434cde7043913d1ed3c (patch) | |
tree | 01d58f5b823240cecdcfad4bf8668bac63313e90 /lib/test_fortify/write_overflow-strcpy.c | |
parent | d3bb2f9b5ee66d5e000293edd6b6575e59d11db9 (diff) |
drm/i915: Avoid mixing integer types during batch copies
Be consistent and use unsigned long throughout the chunk copies to
avoid the inherent clumsiness of mixing integer types of different
widths and signs. Failing to take acount of a wider unsigned type when
using min_t can lead to treating it as a negative, only for it flip back
to a large unsigned value after passing a boundary check.
Fixes: ed13033f0287 ("drm/i915/cmdparser: Only cache the dst vmap")
Testcase: igt/gen9_exec_parse/bb-large
Reported-by: "Candelaria, Jared" <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: "Candelaria, Jared" <[email protected]>
Cc: "Bloomfield, Jon" <[email protected]>
Cc: <[email protected]> # v4.9+
Reviewed-by: Mika Kuoppala <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strcpy.c')
0 files changed, 0 insertions, 0 deletions