[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1304084515-22132-2-git-send-email-roberto.sassu@polito.it>
Date: Fri, 29 Apr 2011 15:41:49 +0200
From: Roberto Sassu <roberto.sassu@...ito.it>
To: linux-security-module@...r.kernel.org
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
dhowells@...hat.com, jmorris@...ei.org, zohar@...ux.vnet.ibm.com,
safford@...son.ibm.com, tyhicks@...ux.vnet.ibm.com,
kirkland@...onical.com, ecryptfs-devel@...ts.launchpad.net,
casey@...aufler-ca.com, eparis@...hat.com, sds@...ho.nsa.gov,
selinux@...ho.nsa.gov, viro@...iv.linux.org.uk,
john.johansen@...onical.com, apparmor@...ts.ubuntu.com,
Roberto Sassu <roberto.sassu@...ito.it>
Subject: [RFC][PATCH 1/4] fs: preserve S_IMA inode flag in fsstack_copy_attr_all()
The S_IMA inode flag of the upper inode must be preserved to avoid IMA
tries to free its own structure for inodes that were not measured before.
Signed-off-by: Roberto Sassu <roberto.sassu@...ito.it>
---
fs/stack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/stack.c b/fs/stack.c
index 4a6f7f4..a6deb1c 100644
--- a/fs/stack.c
+++ b/fs/stack.c
@@ -73,7 +73,7 @@ void fsstack_copy_attr_all(struct inode *dest, const struct inode *src)
dest->i_mtime = src->i_mtime;
dest->i_ctime = src->i_ctime;
dest->i_blkbits = src->i_blkbits;
- dest->i_flags = src->i_flags;
+ dest->i_flags = (src->i_flags & ~S_IMA) + (dest->i_flags & S_IMA);
dest->i_nlink = src->i_nlink;
}
EXPORT_SYMBOL_GPL(fsstack_copy_attr_all);
--
1.7.4.4
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (2061 bytes)
Powered by blists - more mailing lists