lkml.org 
[lkml]   [2023]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [GIT PULL] fscrypt fix for v6.3-rc4
    On Mon, Mar 20, 2023 at 1:56 PM Eric Biggers <ebiggers@kernel.org> wrote:
    >
    > fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref()

    Side note: please just use WARN_ON_ONCE() for things like this, not WARN_ON.

    If it's triggerable, it should be triggered only once rather than
    flood the logs and possibly cause a DoS.

    And if it's not triggerable, the "ONCE" doesn't matter.

    I note that fscypt in general seems to be *way* too happy with
    WARN_ON() as some kind of debugging aid.

    It's not good in general (printf for debugging is wonderful, but
    shouldn't be left in the sources to rot for all eternity), but it's
    particularly not good in that form.

    Linus

    \
     
     \ /
      Last update: 2023-03-27 01:10    [W:8.186 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site