Before adding to usablemem_rgns, check if the memory range is already included.
Subsystems (2)
Quoted 10 lines
Quoted 9 lines
When
kexec_iomem_for_each_line()reads from/proc/iomem, concurrent modifications to/proc/iomemmay lead tousablemem_rgnsrecording duplicate Crash kernel segments.
This can result in the number of retrieved Crash kernel segments exceedingCRASH_MAX_RESERVED_RANGES, triggering a realloc of thecrash_reserved_meminusablemem_rgns, which could crash the process. We should ensure that each range added tousablemem_rgnsis unique to prevent these issues.
Quoted 8 lines
Thanks Chen Haixiang,
This looks reasonable to me, but, as per Kernel submissions, I will need an Signed-off-by line [1] in order to apply this patch.
[1]
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign
-your-work-the-developer-s-certificate-of-origin
Thank you for your feedback, and I apologize for missing the Signed-off-by line. I'll resend the patch v2 with the required Signed-off-by line shortly.
Best regards,
Chen Haixiang
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec