summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch
diff options
context:
space:
mode:
authorKarthik Ramanan <a0393906@ti.com>2017-01-05 18:01:23 +0530
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-01-05 23:38:04 +0000
commit5dbfea7fd40a029a5067dd9800c3205addd6b798 (patch)
treef01f3977d9cc1bf94b6b4c30f0670b823dfb7155 /meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch
parentfc9db179d4cad2a70aaa8e077bb93d2f26205b85 (diff)
dra7xx-evm: Fix issue with bluetooth pairing
This patch is ported from meta-agl-extra Commit details below: commit c50805d25ba95473e8b4d1eb28d1203a328cd77a Author: José Bollo <jose.bollo@iot.bzh> Change-Id: I54a40935d6d2bbd9c267985c9e23a14bdffb7a3c Signed-off-by: Karthik Ramanan <a0393906@ti.com> (cherry picked from commit 554f8d394c626d3a151127e67caddc3196e3ffc1)
Diffstat (limited to 'meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch')
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch
new file mode 100644
index 000000000..c516f3aa5
--- /dev/null
+++ b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/0002-smack-fix-cache-of-access-labels.patch
@@ -0,0 +1,43 @@
+From 99267706991ab84bd44ceaea9a7ec886bbdd58e0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jobol@nonadev.net>
+Date: Tue, 12 Jan 2016 21:23:40 +0100
+Subject: [PATCH 2/4] smack: fix cache of access labels
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Before this commit, removing the access property of
+a file, aka, the extended attribute security.SMACK64
+was not effictive until the cache had been cleaned.
+
+This patch fixes that problem.
+
+Signed-off-by: José Bollo <jobol@nonadev.net>
+Acked-by: Casey Schaufler <casey@schaufler-ca.com>
+---
+ security/smack/smack_lsm.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
+index b20ef06..b2bcb14 100644
+--- a/security/smack/smack_lsm.c
++++ b/security/smack/smack_lsm.c
+@@ -1444,9 +1444,13 @@ static int smack_inode_removexattr(struct dentry *dentry, const char *name)
+ * Don't do anything special for these.
+ * XATTR_NAME_SMACKIPIN
+ * XATTR_NAME_SMACKIPOUT
+- * XATTR_NAME_SMACKEXEC
+ */
+- if (strcmp(name, XATTR_NAME_SMACK) == 0)
++ if (strcmp(name, XATTR_NAME_SMACK) == 0) {
++ struct super_block *sbp = d_backing_inode(dentry)->i_sb;
++ struct superblock_smack *sbsp = sbp->s_security;
++
++ isp->smk_inode = sbsp->smk_default;
++ } else if (strcmp(name, XATTR_NAME_SMACKEXEC) == 0)
+ isp->smk_task = NULL;
+ else if (strcmp(name, XATTR_NAME_SMACKMMAP) == 0)
+ isp->smk_mmap = NULL;
+--
+2.7.4
+