coredump: Remove the WARN_ON in dump_vma_snapshot
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 8 Mar 2022 19:01:19 +0000 (13:01 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 8 Mar 2022 19:01:19 +0000 (13:01 -0600)
commit49c1866348f364478a0c4d3dd13fd08bb82d3a5b
tree3c6ff230f2d84c587a0259dcd30bce7a29583990
parent95c5436a4883841588dae86fb0b9325f47ba5ad3
coredump: Remove the WARN_ON in dump_vma_snapshot

The condition is impossible and to the best of my knowledge has never
triggered.

We are in deep trouble if that conditions happens and we walk past
the end of our allocated array.

So delete the WARN_ON and the code that makes it look like the kernel
can handle the case of walking past the end of it's vma_meta array.

Reviewed-by: Jann Horn <jannh@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/coredump.c