Revert "coredump: Remove the WARN_ON in dump_vma_snapshot"

This reverts commit b043ae637a.

It breaks the abi and is not needed for Android devices so it can be
dropped.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I565f6e1c6053b1d43aa7fb69e0f6b533401d16be
This commit is contained in:
Greg Kroah-Hartman 2022-04-19 18:41:40 +02:00
parent 5f24894332
commit b7dbb1ee1f

View File

@ -1128,6 +1128,12 @@ static bool dump_vma_snapshot(struct coredump_params *cprm)
mmap_write_unlock(mm);
if (WARN_ON(i != cprm->vma_count)) {
kvfree(cprm->vma_meta);
return false;
}
for (i = 0; i < cprm->vma_count; i++) {
struct core_vma_metadata *m = cprm->vma_meta + i;