lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Mar 2020 17:25:46 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH v4 11/69] lookup_fast(): consolidate the RCU success case

On Fri, Mar 13, 2020 at 4:55 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> -                       if (unlikely(negative))
> +                       if (unlikely(!inode))
>                                 return -ENOENT;

Isn't that buggy?

Despite the name, 'inode' isn't an inode pointer. It's a pointer to
the return location.

I think the test should be

        if (unlikely(!*inode))
                return -ENOENT;

and I also suspect that the argument name should be fixed (maybe
"inodepp", maybe something better).

Because the "inode" pointer itself always exists. The callers will
have something like

        struct inode *inode;

and then pass in "&inode" to the function.

And it's possible that I'm talking complete garbage.

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ