rpms/kernel/F-12 fix-LOOKUP_FOLLOW-on-automount-symlinks.patch, NONE, 1.1.2.2 kernel.spec, 1.1960.2.23, 1.1960.2.24
Chuck Ebbert
cebbert at fedoraproject.org
Sat Feb 27 22:49:48 UTC 2010
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20561
Modified Files:
Tag: private-fedora-12-2_6_31
kernel.spec
Added Files:
Tag: private-fedora-12-2_6_31
fix-LOOKUP_FOLLOW-on-automount-symlinks.patch
Log Message:
Fix lookup of automount symlinks (#567813)
fix-LOOKUP_FOLLOW-on-automount-symlinks.patch:
namei.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- NEW FILE fix-LOOKUP_FOLLOW-on-automount-symlinks.patch ---
From: Al Viro <viro at ZenIV.linux.org.uk>
Date: Tue, 16 Feb 2010 18:09:36 +0000 (+0000)
Subject: fix LOOKUP_FOLLOW on automount "symlinks"
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=ac278a9c505092dd82077a2446af8f9fc0d9c095
fix LOOKUP_FOLLOW on automount "symlinks"
RHBZ#567813
[ affects 2.6.18+ ]
Make sure that automount "symlinks" are followed regardless of LOOKUP_FOLLOW;
it should have no effect on them.
Cc: stable at kernel.org
Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
---
diff --git a/fs/namei.c b/fs/namei.c
index d62fdc8..a4855af 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -823,6 +823,17 @@ fail:
}
/*
+ * This is a temporary kludge to deal with "automount" symlinks; proper
+ * solution is to trigger them on follow_mount(), so that do_lookup()
+ * would DTRT. To be killed before 2.6.34-final.
+ */
+static inline int follow_on_final(struct inode *inode, unsigned lookup_flags)
+{
+ return inode && unlikely(inode->i_op->follow_link) &&
+ ((lookup_flags & LOOKUP_FOLLOW) || S_ISDIR(inode->i_mode));
+}
+
+/*
* Name resolution.
* This is the basic name resolution function, turning a pathname into
* the final dentry. We expect 'base' to be positive and a directory.
@@ -942,8 +953,7 @@ last_component:
if (err)
break;
inode = next.dentry->d_inode;
- if ((lookup_flags & LOOKUP_FOLLOW)
- && inode && inode->i_op->follow_link) {
+ if (follow_on_final(inode, lookup_flags)) {
err = do_follow_link(&next, nd);
if (err)
goto return_err;
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1960.2.23
retrieving revision 1.1960.2.24
diff -u -p -r1.1960.2.23 -r1.1960.2.24
--- kernel.spec 22 Feb 2010 20:50:29 -0000 1.1960.2.23
+++ kernel.spec 27 Feb 2010 22:49:47 -0000 1.1960.2.24
@@ -845,6 +845,9 @@ Patch16570: futex-handle-user-space-corr
Patch16580: partitions-use-sector-size-for-efi-gpt.patch
+# bz#567813
+Patch16590: fix-LOOKUP_FOLLOW-on-automount-symlinks.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1578,6 +1581,9 @@ ApplyPatch futex-handle-user-space-corru
ApplyPatch partitions-use-sector-size-for-efi-gpt.patch
+# bz#567813
+ApplyPatch fix-LOOKUP_FOLLOW-on-automount-symlinks.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2237,6 +2243,9 @@ fi
# futex-handle-user-space-corruption-gracefully.patch
%changelog
+* Sat Feb 27 2010 Chuck Ebbert <cebbert at redhat.com> 2.6.31.12-174.2.24
+- Fix lookup of automount symlinks (#567813)
+
* Mon Feb 22 2010 Kyle McMartin <kyle at redhat.com>
- nfs-fix-an-oops-when-truncating-a-file.patch: from 2.6.32-stable queue.
More information about the scm-commits
mailing list