linux_old1/fs/kernfs
Rasmus Villemoes 72392ed0eb kernfs: Fix kernfs_name_compare
Returning a difference from a comparison functions is usually wrong
(see acbbe6fbb2 "kcmp: fix standard comparison bug" for the long
story). Here there is the additional twist that if the void pointers
ns and kn->ns happen to differ by a multiple of 2^32,
kernfs_name_compare returns 0, falsely reporting a match to the
caller.

Technically 'hash - kn->hash' is ok since the hashes are restricted to
31 bits, but it's better to avoid that subtlety.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-09 15:51:08 -08:00
..
Kconfig kernfs: add CONFIG_KERNFS 2014-02-07 16:08:57 -08:00
Makefile
dir.c kernfs: Fix kernfs_name_compare 2015-01-09 15:51:08 -08:00
file.c vm_area_operations: kill ->migrate() 2014-12-17 08:26:51 -05:00
inode.c kernfs: protect lazy kernfs_iattrs allocation with mutex 2014-04-16 11:54:40 -07:00
kernfs-internal.h kernfs: implement kernfs_root->supers list 2014-04-25 11:43:31 -07:00
mount.c kernfs: introduce kernfs_pin_sb() 2014-06-30 10:16:25 -04:00
symlink.c kernfs: remove kernfs_addrm_cxt 2014-02-07 15:42:40 -08:00