lkml.org 
[lkml]   [2020]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-06-09 18:20    [W:1.658 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site