[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006090919.3FAC6C7A@keescook>
Date: Tue, 9 Jun 2020 09:19:16 -0700
From: Kees Cook <keescook@...omium.org>
To: David Howells <dhowells@...hat.com>
Cc: linux-afs@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
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@...omium.org>
> Signed-off-by: David Howells <dhowells@...hat.com>
Reviewed-by: Kees Cook <keescook@...omium.org>
Thanks!
--
Kees Cook
Powered by blists - more mailing lists