Re: (subset) [PATCH] drm/imagination: Fixed infinite loop in pvr_vm_mips_map()

2023-12-15 Thread Maxime Ripard
On Fri, 08 Dec 2023 16:08:25 +, Donald Robson wrote: > 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_p

[PATCH] drm/imagination: Fixed infinite loop in pvr_vm_mips_map()

2023-12-08 Thread Donald Robson
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