selinux: reduce the number of calls to synchronize_net() when flushing caches
authorPaul Moore <pmoore@redhat.com>
Thu, 26 Jun 2014 18:33:56 +0000 (14:33 -0400)
committerStephen Smalley <sds@tycho.nsa.gov>
Tue, 20 Jan 2015 19:27:41 +0000 (14:27 -0500)
commit5b5b6febcab05ef9e8972ead4cc3cf8381d45a95
treeb003261faef29edd595b7562b481db9408b71037
parent2294d499b7969df3838becf5e58bf16b0e3c86c8
selinux: reduce the number of calls to synchronize_net() when flushing caches

commit 615e51fdda6f274e94b1e905fcaf6111e0d9aa20 upstream.

When flushing the AVC, such as during a policy load, the various
network caches are also flushed, with each making a call to
synchronize_net() which has shown to be expensive in some cases.
This patch consolidates the network cache flushes into a single AVC
callback which only calls synchronize_net() once for each AVC cache
flush.

Change-Id: I2a7f020748d1adf2b68246f6ef86d0c871adffb7
Reported-by: Jaejyn Shin <flagon22bass@gmail.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/hooks.c
security/selinux/include/netif.h
security/selinux/include/netnode.h
security/selinux/include/netport.h
security/selinux/netif.c
security/selinux/netnode.c
security/selinux/netport.c