Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] afs: Fix use of BUG()
Date: Tue, 9 Jun 2020 09:19:16 -0700	[thread overview]
Message-ID: <202006090919.3FAC6C7A@keescook> (raw)
In-Reply-To: <159171920664.3038039.18059422273265286162.stgit@warthog.procyon.org.uk>

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

  reply	other threads:[~2020-06-09 16:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 16:13 [PATCH 0/6] afs: Fixes David Howells
2020-06-09 16:13 ` [PATCH 1/6] afs: Fix memory leak in afs_put_sysnames() David Howells
2020-06-09 16:13 ` [PATCH 2/6] afs: Fix file locking David Howells
2020-06-09 16:13 ` [PATCH 3/6] afs: Fix use of BUG() David Howells
2020-06-09 16:19   ` Kees Cook [this message]
2020-06-09 16:13 ` [PATCH 4/6] afs: Fix debugging statements with %px to be %p David Howells
2020-06-09 16:18   ` Kees Cook
2020-06-09 17:08   ` Marc Dionne
2020-06-09 16:13 ` [PATCH 5/6] afs: Remove afs_zero_fid as it's not used David Howells
2020-06-09 16:13 ` [PATCH 6/6] afs: Make afs_zap_data() static David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202006090919.3FAC6C7A@keescook \
    --to=keescook@chromium.org \
    --cc=dhowells@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 3/6] afs: Fix use of BUG()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).