extern struct page *selinux_kernel_status_page(void);
#define SELINUX_KERNEL_STATUS_VERSION 1
-struct selinux_kernel_status
-{
+struct selinux_kernel_status {
u32 version; /* version number of thie structure */
u32 sequence; /* sequence number of seqlock logic */
u32 enforcing; /* current setting of enforcing mode */
* In most cases, application shall confirm the kernel status is not
* changed without any system call invocations.
*/
-static struct page *selinux_status_page = NULL;
+static struct page *selinux_status_page;
static DEFINE_MUTEX(selinux_status_lock);
/*
struct page *result = NULL;
mutex_lock(&selinux_status_lock);
- if (!selinux_status_page)
- {
+ if (!selinux_status_page) {
selinux_status_page = alloc_page(GFP_KERNEL|__GFP_ZERO);
- if (selinux_status_page)
- {
+
+ if (selinux_status_page) {
status = page_address(selinux_status_page);
status->version = SELINUX_KERNEL_STATUS_VERSION;
struct selinux_kernel_status *status;
mutex_lock(&selinux_status_lock);
- if (selinux_status_page)
- {
+ if (selinux_status_page) {
status = page_address(selinux_status_page);
status->sequence++;
struct selinux_kernel_status *status;
mutex_lock(&selinux_status_lock);
- if (selinux_status_page)
- {
+ if (selinux_status_page) {
status = page_address(selinux_status_page);
status->sequence++;