From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:53200 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbcCAWXb (ORCPT ); Tue, 1 Mar 2016 17:23:31 -0500 Received: from pmta03.dal05.mailchimp.com (127.0.0.1) by mail333.us4.mandrillapp.com id hqob66174nol for ; Tue, 1 Mar 2016 22:23:26 +0000 (envelope-from ) From: Subject: Patch "should_follow_link(): validate ->d_seq after having decided to follow" has been added to the 4.4-stable tree To: , Cc: , Message-Id: <145687100324312@kroah.com> Date: Tue, 01 Mar 2016 22:23:26 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled should_follow_link(): validate ->d_seq after having decided to follow to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: should_follow_link-validate-d_seq-after-having-decided-to-follow.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From a7f775428b8f5808815c0e3004020cedb94cbe3b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 27 Feb 2016 19:31:01 -0500 Subject: should_follow_link(): validate ->d_seq after having decided to follow From: Al Viro commit a7f775428b8f5808815c0e3004020cedb94cbe3b upstream. ... otherwise d_is_symlink() above might have nothing to do with the inode value we've got. Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- fs/namei.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/namei.c +++ b/fs/namei.c @@ -1711,6 +1711,11 @@ static inline int should_follow_link(str return 0; if (!follow) return 0; + /* make sure that d_is_symlink above matches inode */ + if (nd->flags & LOOKUP_RCU) { + if (read_seqcount_retry(&link->dentry->d_seq, seq)) + return -ECHILD; + } return pick_link(nd, link, inode, seq); } Patches currently in stable-queue which might be from viro@zeniv.linux.org.uk are queue-4.4/make-sure-that-freeing-shmem-fast-symlinks-is-rcu-delayed.patch queue-4.4/do_last-eloop-failure-exit-should-be-done-after-leaving-rcu-mode.patch queue-4.4/bcache-fix-a-leak-in-bch_cached_dev_run.patch queue-4.4/do_last-don-t-let-a-bogus-return-value-from-open-et.al.-to-confuse-us.patch queue-4.4/locks-fix-unlock-when-fcntl_setlk-races-with-a-close.patch queue-4.4/namei-d_inode-of-a-pinned-dentry-is-stable-only-for-positives.patch queue-4.4/should_follow_link-validate-d_seq-after-having-decided-to-follow.patch queue-4.4/uml-fix-hostfs-mknod.patch queue-4.4/hpfs-don-t-truncate-the-file-when-delete-fails.patch