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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150125221643.GK29656@ZenIV.linux.org.uk>
Date:	Sun, 25 Jan 2015 22:16:43 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Richard Weinberger <richard@....at>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: Detect API misuse of i_op->lookup

On Sun, Jan 25, 2015 at 10:57:40PM +0100, Richard Weinberger wrote:
> Hunting down a refcount issue in an out-of-tree filesystem uncovered
> that its lookup function directly returned the dentry which was passed to it.
> Add a BUG_ON() to detect such misuse in future.

In principle, it's not a bug.  You *must* grab a reference to dentry before
returning it, but you can very well decide to return the one you've got -
any place where have ->lookup() return NULL has every right to become
return dget(dentry).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ