mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov
Cc: sds@tycho.nsa.gov, jmorris@namei.org, mingo@elte.hu, dhowells@redhat.com
Subject: [PATCH 3/3] SELinux: flush the avc before disabling SELinux
Date: Sat, 12 Sep 2009 22:54:23 -0400	[thread overview]
Message-ID: <20090913025423.6583.62118.stgit@paris.rdu.redhat.com> (raw)
In-Reply-To: <20090913025409.6583.58777.stgit@paris.rdu.redhat.com>

Before SELinux is disabled at boot it can create AVC entries.  This patch
will flush those entries before disabling SELinux.

Signed-off-by: Eric Paris <eparis@redhat.com>
---

 security/selinux/avc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index f601246..1ed0f07 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -868,6 +868,8 @@ u32 avc_policy_seqno(void)
 
 void avc_disable(void)
 {
+	avc_flush();
+	synchronize_rcu();
 	if (avc_node_cachep)
 		kmem_cache_destroy(avc_node_cachep);
 }


  parent reply	other threads:[~2009-09-13  2:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-13  2:54 [PATCH 1/3] Creds: creds->security can be NULL is selinux is disabled Eric Paris
2009-09-13  2:54 ` [PATCH 2/3] SELinux: seperate avc_cache flushing Eric Paris
2009-09-13  2:54 ` Eric Paris [this message]
2009-09-13 22:23 ` [PATCH 1/3] Creds: creds->security can be NULL is selinux is disabled James Morris
2009-09-13 22:55   ` Eric Paris
2009-09-14  2:58 ` [GIT] fix creds / SELinux regressions James Morris
2009-09-14  4:20   ` Ingo Molnar
2009-09-14 11:53 ` [PATCH 1/3] Creds: creds->security can be NULL is selinux is disabled David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090913025423.6583.62118.stgit@paris.rdu.redhat.com \
    --to=eparis@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®