]> git.baikalelectronics.ru Git - kernel.git/commit
namei: d_is_negative() should be checked before ->d_seq validation
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 7 May 2015 23:24:57 +0000 (19:24 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 May 2015 04:12:35 +0000 (00:12 -0400)
commit74b3a277d02a0e1ae18d25ea68d595d7ee653219
tree0bdde729de49ac95858f5429b40419b643fcc1cb
parent194b7115c289879d9d371e5ad3e7d18c3489ecbf
namei: d_is_negative() should be checked before ->d_seq validation

Fetching ->d_inode, verifying ->d_seq and finding d_is_negative() to
be true does *not* mean that inode we'd fetched had been NULL - that
holds only while ->d_seq is still unchanged.

Shift d_is_negative() checks into lookup_fast() prior to ->d_seq
verification.

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c