Quantcast
Channel: lkml.org : Vaidyanathan Srinivasan
Viewing all articles
Browse latest Browse all 890

Re: [RFC][PATCH 08/42] make sure do_dentry_open() won't return pos ...

$
0
0
Linus Torvalds writes: On Tue, Jul 10, 2018 at 7:23 PM Al Viro <viro@zeniv.linux.org.uk> wrote:

[...]

+ }
Can we please do this as
Can we please do this as
        if (WARN_ON_ONCE(error > 0))
                error = -EINVAL;


instead?

That already should do the unlikely for you, and *if* somebody can
trigger this, at least they won't be spamming the logs and making a
mess. A single warning is fine.

             Linus


Viewing all articles
Browse latest Browse all 890

Trending Articles