int selinux_disable(void)
{
	extern void exit_sel_fs(void);

	if (ss_initialized) {
		/* Not permitted after initial policy load. */
		return -EINVAL;
	}

	if (selinux_disabled) {
		/* Only do this once. */
		return -EINVAL;
	}

	printk(KERN_INFO "SELinux:  Disabled at runtime.\n");

	selinux_disabled = 1;
	selinux_enabled = 0;

	/* Try to destroy the avc node cache */
	avc_disable();

	/* Reset security_ops to the secondary module, dummy or capability. */
	security_ops = secondary_ops;

	/* Unregister netfilter hooks. */
	selinux_nf_ip_exit();

	/* Unregister selinuxfs. */
	exit_sel_fs();

	return 0;
}
int selinux_disable(void)
{
	extern void exit_sel_fs(void);

	if (ss_initialized) {
		 
		return -EINVAL;
	}

	if (selinux_disabled) {
		 
		return -EINVAL;
	}

	printk(KERN_INFO "SELinux:  Disabled at runtime.\n");

	selinux_disabled = 1;
	selinux_enabled = 0;

	 
	avc_disable();

	 
	security_ops = secondary_ops;

	 
	selinux_nf_ip_exit();

	 
	exit_sel_fs();

	return 0;
}