Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1239189

[PATCH v2 2/2] gfs2: Invalide security labels of inodes that go invalid

From Andreas Gruenbacher <agruenba@redhat.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/2] gfs2: Invalide security labels of inodes that go invalid
Date 2015-10-04 21:30 +0200
Message-ID <qfX8R-1ay-3@gated-at.bofh.it> (permalink)
References <qfWZb-Zo-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


When gfs2 releases the glock of an inode, it must invalidate all
information cached for that inode, including the page cache and acls.  Use
the new security_inode_invalidate_secctx hook to also invalidate security
labels in that case.  These items will be reread from disk when needed
after reacquiring the glock.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Bob Peterson <rpeterso@redhat.com>
Cc: cluster-devel@redhat.com
---
 fs/gfs2/glops.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 1f6c9c3..0833076 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -13,6 +13,7 @@
 #include <linux/gfs2_ondisk.h>
 #include <linux/bio.h>
 #include <linux/posix_acl.h>
+#include <linux/security.h>
 
 #include "gfs2.h"
 #include "incore.h"
@@ -262,6 +263,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
 		if (ip) {
 			set_bit(GIF_INVALID, &ip->i_flags);
 			forget_all_cached_acls(&ip->i_inode);
+			security_inode_invalidate_secctx(&ip->i_inode);
 			gfs2_dir_hash_inval(ip);
 		}
 	}
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] Inode security label invalidation Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-04 21:20 +0200
  [PATCH v2 2/2] gfs2: Invalide security labels of inodes that go invalid Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-04 21:30 +0200
  [PATCH v2 1/2] security: Add hook to invalidate inode security labels Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-04 21:30 +0200
    Re: [PATCH v2 1/2] security: Add hook to invalidate inode security  labels Stephen Smalley <sds@tycho.nsa.gov> - 2015-10-05 17:20 +0200
      Re: [PATCH v2 1/2] security: Add hook to invalidate inode security labels Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-06 00:00 +0200
    Re: [PATCH v2 1/2] security: Add hook to invalidate inode security  labels Casey Schaufler <casey@schaufler-ca.com> - 2015-10-05 20:30 +0200
      Re: [PATCH v2 1/2] security: Add hook to invalidate inode security labels Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 20:40 +0200

csiph-web