+ autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: autofs4: use ACCESS_ONCE rather than rcu_dereference for dentry->d_inode
has been added to the -mm tree.  Its filename is
     autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: NeilBrown <neilb@xxxxxxx>
Subject: autofs4: use ACCESS_ONCE rather than rcu_dereference for dentry->d_inode

As the kbuild test robot reports, rcu_dereference() isn't really
appropriate here - we don't need a memory barrier, just a guard
against accidentally dereferencing NULL.

This can be merged into
 autofs4: d_manage() should return -EISDIR when appropriate in rcu-walk mod=
e.
in 'mm'.

Signed-off-by: NeilBrown <neilb@xxxxxxx>
Cc: Ian Kent <raven@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/autofs4/root.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/autofs4/root.c~autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode-fix fs/autofs4/root.c
--- a/fs/autofs4/root.c~autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode-fix
+++ a/fs/autofs4/root.c
@@ -463,7 +463,7 @@ static int autofs4_d_manage(struct dentr
 			return 0;
 		if (d_mountpoint(dentry))
 			return 0;
-		inode = rcu_dereference(dentry->d_inode);
+		inode = ACCESS_ONCE(dentry->d_inode);
 		if (inode && S_ISLNK(inode->i_mode))
 			return -EISDIR;
 		if (list_empty(&dentry->d_subdirs))
_

Patches currently in -mm which might be from neilb@xxxxxxx are

autofs4-allow-rcu-walk-to-walk-through-autofs4.patch
autofs4-factor-should_expire-out-of-autofs4_expire_indirect.patch
autofs4-make-autofs4_can_expire-idempotent.patch
autofs4-avoid-taking-fs_lock-during-rcu-walk.patch
autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode.patch
autofs4-d_manage-should-return-eisdir-when-appropriate-in-rcu-walk-mode-fix.patch
autofs-the-documentation-i-wanted-to-read.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux