diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-03 23:15:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-03 23:15:21 -0400 |
commit | 2864f301424227d9d3bde6d550bc224a83535b46 (patch) | |
tree | 7d6535793143e2d542fa69bfdf6ba776b8846ccb /arch/arm64/kernel/entry.S | |
parent | 1a695a905c18548062509178b98bc91e67510864 (diff) |
iget_locked et.al.: make sure we don't return bad inodes
If one thread does iget_locked(), proceeds to try and set
the new inode up and fails, inode will be unhashed and dropped.
However, another thread doing ilookup/iget_locked in the middle
of that would end up finding a half-set-up inode, grabbing
a reference, waiting for it to come unlocked and getting the
resulting bad inode. It's a race (if that ilookup had been
called just after the failure of setup attempt it wouldn't
have found the sucker at all), particularly unpleasant in
cases when failure is transient/caller-dependent/etc.
While it can be dealt with in the callers, there's no reason
not to handle it in fs/inode.c primitives, especially since
the cost is trivial.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm64/kernel/entry.S')
0 files changed, 0 insertions, 0 deletions