diff options
author | Donald Robson <[email protected]> | 2023-12-08 16:08:25 +0000 |
---|---|---|
committer | Maxime Ripard <[email protected]> | 2023-12-15 14:03:57 +0100 |
commit | b39610c773431ac7991cf6235e26d693ccabd9e9 (patch) | |
tree | 02ebe33ce06ca2a529a1b0e20c0594835036625a /scripts/generate_rust_analyzer.py | |
parent | b1a2aa9bcbb88a7dc1c4df98dbf4f4df9ca79c9f (diff) |
drm/imagination: Fixed infinite loop in pvr_vm_mips_map()
Unwinding loop in error path for this function uses unsigned limit
variable, causing the promotion of the signed counter variable.
--> 204 for (; pfn >= start_pfn; pfn--)
^^^^^^^^^^^^^^^^
If start_pfn can be zero then this is an endless loop. I've seen this
code in other places as well. This loop is slightly off as well. It
should decrement pfn on the first iteration.
Fix by making the loop limit variables signed. Also fix missing
predecrement by modifying to while loop.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Donald Robson <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions