diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-03-19 03:05:10 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-03-19 03:05:10 -0400 |
commit | b4b7a4ef097f288f724420b473dbf92a89c0ab7e (patch) | |
tree | 23ad8101e3e77c32a8d1e1b95a9c1cd7f7a475b7 /security | |
parent | e9ce335df51ff782035a15c261a3c0c9892a1767 (diff) | |
parent | a3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff) |
Merge branch 'master' into for-linus
Conflicts:
block/Kconfig
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/avc.c | 6 | ||||
-rw-r--r-- | security/tomoyo/common.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index db0fd9f33499..989fef82563a 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -337,7 +337,7 @@ static inline struct avc_node *avc_search_node(u32 ssid, u32 tsid, u16 tclass) | |||
337 | * Look up an AVC entry that is valid for the | 337 | * Look up an AVC entry that is valid for the |
338 | * (@ssid, @tsid), interpreting the permissions | 338 | * (@ssid, @tsid), interpreting the permissions |
339 | * based on @tclass. If a valid AVC entry exists, | 339 | * based on @tclass. If a valid AVC entry exists, |
340 | * then this function return the avc_node. | 340 | * then this function returns the avc_node. |
341 | * Otherwise, this function returns NULL. | 341 | * Otherwise, this function returns NULL. |
342 | */ | 342 | */ |
343 | static struct avc_node *avc_lookup(u32 ssid, u32 tsid, u16 tclass) | 343 | static struct avc_node *avc_lookup(u32 ssid, u32 tsid, u16 tclass) |
@@ -523,7 +523,7 @@ void avc_audit(u32 ssid, u32 tsid, | |||
523 | * @perms: permissions | 523 | * @perms: permissions |
524 | * | 524 | * |
525 | * Register a callback function for events in the set @events | 525 | * Register a callback function for events in the set @events |
526 | * related to the SID pair (@ssid, @tsid) and | 526 | * related to the SID pair (@ssid, @tsid) |
527 | * and the permissions @perms, interpreting | 527 | * and the permissions @perms, interpreting |
528 | * @perms based on @tclass. Returns %0 on success or | 528 | * @perms based on @tclass. Returns %0 on success or |
529 | * -%ENOMEM if insufficient memory exists to add the callback. | 529 | * -%ENOMEM if insufficient memory exists to add the callback. |
@@ -568,7 +568,7 @@ static inline int avc_sidcmp(u32 x, u32 y) | |||
568 | * | 568 | * |
569 | * if a valid AVC entry doesn't exist,this function returns -ENOENT. | 569 | * if a valid AVC entry doesn't exist,this function returns -ENOENT. |
570 | * if kmalloc() called internal returns NULL, this function returns -ENOMEM. | 570 | * if kmalloc() called internal returns NULL, this function returns -ENOMEM. |
571 | * otherwise, this function update the AVC entry. The original AVC-entry object | 571 | * otherwise, this function updates the AVC entry. The original AVC-entry object |
572 | * will release later by RCU. | 572 | * will release later by RCU. |
573 | */ | 573 | */ |
574 | static int avc_update_node(u32 event, u32 perms, u32 ssid, u32 tsid, u16 tclass, | 574 | static int avc_update_node(u32 event, u32 perms, u32 ssid, u32 tsid, u16 tclass, |
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index ff51f1026b57..ef89947a774b 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c | |||
@@ -886,6 +886,7 @@ static struct tomoyo_profile *tomoyo_find_or_assign_new_profile(const unsigned | |||
886 | ptr = kmalloc(sizeof(*ptr), GFP_KERNEL); | 886 | ptr = kmalloc(sizeof(*ptr), GFP_KERNEL); |
887 | if (!tomoyo_memory_ok(ptr)) { | 887 | if (!tomoyo_memory_ok(ptr)) { |
888 | kfree(ptr); | 888 | kfree(ptr); |
889 | ptr = NULL; | ||
889 | goto ok; | 890 | goto ok; |
890 | } | 891 | } |
891 | for (i = 0; i < TOMOYO_MAX_CONTROL_INDEX; i++) | 892 | for (i = 0; i < TOMOYO_MAX_CONTROL_INDEX; i++) |