The patch titled smack: fix fuse mount hang has been added to the -mm tree. Its filename is smack-fuse-mount-hang-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 *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: smack: fix fuse mount hang From: Casey Schaufler <casey@xxxxxxxxxxxxxxxx> The d_instantiate hook for Smack can hang on the root inode of a filesystem if the file system code has not really done all the set-up. Fuse is known to encounter this problem. This change detects an attempt to instantiate a root inode and addresses it early in the processing, before any attempt is made to do something that might hang. Signed-off-by: Casey Schaufler <casey@xxxxxxxxxxxxxxxx> Tested-by: Luiz Fernando N. Capitulino <lcapitulino@xxxxxxxxxxxxxxx> Cc: "Ahmed S. Darwish" <darwish.07@xxxxxxxxx> Cc: Miklos Szeredi <miklos@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- security/smack/smack_lsm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff -puN security/smack/smack_lsm.c~smack-fuse-mount-hang-fix security/smack/smack_lsm.c --- a/security/smack/smack_lsm.c~smack-fuse-mount-hang-fix +++ a/security/smack/smack_lsm.c @@ -1881,6 +1881,18 @@ static void smack_d_instantiate(struct d final = sbsp->smk_default; /* + * If this is the root inode the superblock + * may be in the process of initialization. + * If that is the case use the root value out + * of the superblock. + */ + if (opt_dentry->d_parent == opt_dentry) { + isp->smk_inode = sbsp->smk_root; + isp->smk_flags |= SMK_INODE_INSTANT; + goto unlockandout; + } + + /* * This is pretty hackish. * Casey says that we shouldn't have to do * file system specific code, but it does help _ Patches currently in -mm which might be from casey@xxxxxxxxxxxxxxxx are smack-fuse-mount-hang-fix.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