[PATCH] make selinux LSM vm_enough_memory call stackable

From: Rik van Riel
Date: Tue Oct 28 2003 - 11:41:53 EST


Hi, Stephen, James,

the following (trivial, but untested) patch makes the
selinux LSM vm_enough_memory callback stackable. This
is useful for the virtual context work I'm looking at
now.

The patch is against a very recent bk tree.

===== security/selinux/hooks.c 1.8 vs edited =====
--- 1.8/security/selinux/hooks.c Thu Oct 2 03:12:10 2003
+++ edited/security/selinux/hooks.c Tue Oct 28 11:30:01 2003
@@ -1270,6 +1270,10 @@
int rc;
struct task_security_struct *tsec = current->security;

+ rc = secondary_ops->vm_enough_memory(pages);
+ if (rc)
+ return rc;
+
vm_acct_memory(pages);

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/