summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-max730x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-04 11:00:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-04 11:00:45 -0700
commit0640113be25d283e0ff77a9f041e1242182387f0 (patch)
tree10607912e3d16e9b0354a8f27c213a250608da8d /drivers/gpio/gpio-max730x.c
parent5041caa4d5e6dae418963de0c8f8a83f35e35dcf (diff)
downloadlinux-stable-0640113be25d283e0ff77a9f041e1242182387f0.tar.gz
linux-stable-0640113be25d283e0ff77a9f041e1242182387f0.tar.bz2
linux-stable-0640113be25d283e0ff77a9f041e1242182387f0.zip
vfs: Fix /proc/<tid>/fdinfo/<fd> file handling
Cyrill Gorcunov reports that I broke the fdinfo files with commit 30a08bf2d31d ("proc: move fd symlink i_mode calculations into tid_fd_revalidate()"), and he's quite right. The tid_fd_revalidate() function is not just used for the <tid>/fd symlinks, it's also used for the <tid>/fdinfo/<fd> files, and the permission model for those are different. So do the dynamic symlink permission handling just for symlinks, making the fdinfo files once more appear as the proper regular files they are. Of course, Al Viro argued (probably correctly) that we shouldn't do the symlink permission games at all, and make the symlinks always just be the normal 'lrwxrwxrwx'. That would have avoided this issue too, but since somebody noticed that the permissions had changed (which was the reason for that original commit 30a08bf2d31d in the first place), people do apparently use this feature. [ Basically, you can use the symlink permission data as a cheap "fdinfo" replacement, since you see whether the file is open for reading and/or writing by just looking at st_mode of the symlink. So the feature does make sense, even if the pain it has caused means we probably shouldn't have done it to begin with. ] Reported-and-tested-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpio/gpio-max730x.c')
0 files changed, 0 insertions, 0 deletions