From: Roman Kubiak Date: Mon, 5 Oct 2015 10:27:16 +0000 (+0200) Subject: BACKPORT: Smack: pipefs fix in smack_d_instantiate X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fe6af6b6e2c7bd8c7fe3e1ab46a0ac839cd9e7c;p=platform%2Fkernel%2Flinux-stable.git BACKPORT: Smack: pipefs fix in smack_d_instantiate This fix writes the task label when smack_d_instantiate is called, before the label of the superblock was written on the pipe's inode. Signed-off-by: Roman Kubiak Acked-by: Casey Schaufler (cherry-picked from upstream 8da4aba5bf9869f58d2a6bb30daaf54b2fa72569) --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 1bc8be6e23d2..a4ed76460c50 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -3357,6 +3357,9 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) */ isp->smk_inode = smk_of_current(); break; + case PIPEFS_MAGIC: + isp->smk_inode = smk_of_current(); + break; default: isp->smk_inode = sbsp->smk_root; break;