summaryrefslogtreecommitdiffstats
path: root/security/selinux/netnode.c
diff options
context:
space:
mode:
authorWanlong Gao <gaowanlong@cn.fujitsu.com>2012-03-07 15:17:14 +0100
committerEric Paris <eparis@redhat.com>2012-04-09 18:23:44 +0200
commit562c99f20d989f222138dddfd71e275bfb3665de (patch)
tree47743a88f3aed8b77f79899f45409a597ab77263 /security/selinux/netnode.c
parentSELinux: replace weak GFP_ATOMIC to GFP_KERNEL in avc_add_callback (diff)
downloadlinux-562c99f20d989f222138dddfd71e275bfb3665de.tar.xz
linux-562c99f20d989f222138dddfd71e275bfb3665de.zip
SELinux: avc: remove the useless fields in avc_add_callback
avc_add_callback now just used for registering reset functions in initcalls, and the callback functions just did reset operations. So, reducing the arguments to only one event is enough now. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security/selinux/netnode.c')
-rw-r--r--security/selinux/netnode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c
index 86365857c088..28f911cdd7c7 100644
--- a/security/selinux/netnode.c
+++ b/security/selinux/netnode.c
@@ -297,8 +297,7 @@ static void sel_netnode_flush(void)
spin_unlock_bh(&sel_netnode_lock);
}
-static int sel_netnode_avc_callback(u32 event, u32 ssid, u32 tsid,
- u16 class, u32 perms, u32 *retained)
+static int sel_netnode_avc_callback(u32 event)
{
if (event == AVC_CALLBACK_RESET) {
sel_netnode_flush();
@@ -320,8 +319,7 @@ static __init int sel_netnode_init(void)
sel_netnode_hash[iter].size = 0;
}
- ret = avc_add_callback(sel_netnode_avc_callback, AVC_CALLBACK_RESET,
- SECSID_NULL, SECSID_NULL, SECCLASS_NULL, 0);
+ ret = avc_add_callback(sel_netnode_avc_callback, AVC_CALLBACK_RESET);
if (ret != 0)
panic("avc_add_callback() failed, error %d\n", ret);