On 8/28/25 05:39, Dmytro Prokopchuk1 wrote: > Fix an issue in the 'fail:' cleanup path of the 'assign_shared_memory()' > function where the use of an unsigned long 'i' with the condition > '--i >= 0' caused an infinite loop.
I'm not requesting any changes to this patch, but as a separate discussion this could have been caught with -Wtype-limits: arch/arm/static-shmem.c: In function ‘assign_shared_memory’: arch/arm/static-shmem.c:188:17: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits] 188 | while ( --i >= 0 ) | ^~ It might be nice to add this warning flag into the build by default, but there may be other issues that would need to be addressed first. Having the flag at least for the release build would be nice, since the debug build may (or may not) have justifiable occurrences inside of ASSERTs. Again, I don't mean to increase the scope of work, I'm just making an observation. If you're curious try it out, add this to your make command: EXTRA_CFLAGS_XEN_CORE="-Wtype-limits -Wno-error=type-limits"