[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230321020313.GA108653@mit.edu>
Date: Mon, 20 Mar 2023 22:03:13 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Eric Biggers <ebiggers@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fscrypt@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, Jaegeuk Kim <jaegeuk@...nel.org>
Subject: Re: [GIT PULL] fscrypt fix for v6.3-rc4
On Mon, Mar 20, 2023 at 03:59:34PM -0700, Eric Biggers wrote:
>
> Yes, I agree that most of the WARN_ONs should be WARN_ON_ONCEs. I think I've
> been assuming that WARN_ON is significantly more lightweight than WARN_ON_ONCE.
> But that doesn't seem to be the case, especially since commit 19d436268dde
> ("debug: Add _ONCE() logic to report_bug()").
Another option is WARN_RATELIMITED.
As an unrelated side-note, one of the things I've been working on in
some of the ext4 code paths when I've been moving BUG_ON's to
WARN_RATELIMITED is to think about what might be needed to debug a
problem, and sometimes it can be helpful to use a printf string to
provide more context than just a WARN_ON.
Cheers,
- Ted
Powered by blists - more mailing lists