From b922f94b2cec4a7a771e096131f496d653a4a01a Mon Sep 17 00:00:00 2001 From: James Morris Date: Tue, 20 Mar 2012 12:52:17 +1100 Subject: [PATCH] --- yaml --- r: 292310 b: refs/heads/master c: 09f61cdbb32a9d812c618d3922db533542736bb0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/security/tomoyo/common.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 188000499ea3..640e7b0927e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7e570145cb022beeb58e3f691e0418477b670223 +refs/heads/master: 09f61cdbb32a9d812c618d3922db533542736bb0 diff --git a/trunk/security/tomoyo/common.c b/trunk/security/tomoyo/common.c index d8561c30fbf2..8656b16eef7b 100644 --- a/trunk/security/tomoyo/common.c +++ b/trunk/security/tomoyo/common.c @@ -1069,7 +1069,7 @@ static int tomoyo_write_task(struct tomoyo_acl_param *param) * * @domainname: The name of domain. * - * Returns 0. + * Returns 0 on success, negative value otherwise. * * Caller holds tomoyo_read_lock(). */ @@ -1081,7 +1081,7 @@ static int tomoyo_delete_domain(char *domainname) name.name = domainname; tomoyo_fill_path_info(&name); if (mutex_lock_interruptible(&tomoyo_policy_lock)) - return 0; + return -EINTR; /* Is there an active domain? */ list_for_each_entry_rcu(domain, &tomoyo_domain_list, list) { /* Never delete tomoyo_kernel_domain */ @@ -1164,15 +1164,16 @@ static int tomoyo_write_domain(struct tomoyo_io_buffer *head) bool is_select = !is_delete && tomoyo_str_starts(&data, "select "); unsigned int profile; if (*data == '<') { + int ret = 0; domain = NULL; if (is_delete) - tomoyo_delete_domain(data); + ret = tomoyo_delete_domain(data); else if (is_select) domain = tomoyo_find_domain(data); else domain = tomoyo_assign_domain(data, false); head->w.domain = domain; - return 0; + return ret; } if (!domain) return -EINVAL;