Messages in this thread | | | Date | Tue, 9 Jun 2020 09:19:16 -0700 | From | Kees Cook <> | Subject | Re: [PATCH 3/6] afs: Fix use of BUG() |
| |
On Tue, Jun 09, 2020 at 05:13:26PM +0100, David Howells wrote: > Fix afs_compare_addrs() to use WARN_ON(1) instead of BUG() and return 1 > (ie. srx_a > srx_b). > > There's no point trying to put actual error handling in as this should not > occur unless a new transport address type is allowed by AFS. And even if > it does, in this particular case, it'll just never match unknown types of > addresses. This BUG() was more of a 'you need to add a case here' > indicator. > > Reported-by: Kees Cook <keescook@chromium.org> > Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Thanks!
-- Kees Cook
| |