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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:24:17 +0000 (14:24 +0200)
commit7ba958df64493aa8fb3af315db5095711a0b3589
tree6363b765242d6cc1f8f7ec4e3d596bd893d575aa
parentf6ca862806df3762170cd3251852330304e781c9
coredump: Remove the WARN_ON in dump_vma_snapshot

commit 49c1866348f364478a0c4d3dd13fd08bb82d3a5b upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/coredump.c