オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /branches/ccs-patch/security/ccsecurity/policy_io.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3531 by kumaneko, Thu Mar 25 05:14:06 2010 UTC revision 3534 by kumaneko, Thu Mar 25 06:16:09 2010 UTC
# Line 263  static struct ccs_profile *ccs_find_or_a Line 263  static struct ccs_profile *ccs_find_or_a
263          if (ptr)          if (ptr)
264                  return ptr;                  return ptr;
265          entry = kzalloc(sizeof(*entry), CCS_GFP_FLAGS);          entry = kzalloc(sizeof(*entry), CCS_GFP_FLAGS);
266          mutex_lock(&ccs_policy_lock);          if (mutex_lock_interruptible(&ccs_policy_lock))
267                    goto out;
268          ptr = ccs_profile_ptr[profile];          ptr = ccs_profile_ptr[profile];
269          if (!ptr && ccs_memory_ok(entry, sizeof(*entry))) {          if (!ptr && ccs_memory_ok(entry, sizeof(*entry))) {
270                  ptr = entry;                  ptr = entry;
# Line 280  static struct ccs_profile *ccs_find_or_a Line 281  static struct ccs_profile *ccs_find_or_a
281                  entry = NULL;                  entry = NULL;
282          }          }
283          mutex_unlock(&ccs_policy_lock);          mutex_unlock(&ccs_policy_lock);
284     out:
285          kfree(entry);          kfree(entry);
286          return ptr;          return ptr;
287  }  }
# Line 683  static int ccs_update_manager_entry(cons Line 685  static int ccs_update_manager_entry(cons
685          e.manager = ccs_get_name(manager);          e.manager = ccs_get_name(manager);
686          if (!e.manager)          if (!e.manager)
687                  return -ENOMEM;                  return -ENOMEM;
688          mutex_lock(&ccs_policy_lock);          if (mutex_lock_interruptible(&ccs_policy_lock))
689                    goto out;
690          list_for_each_entry_rcu(ptr, &ccs_policy_manager_list, list) {          list_for_each_entry_rcu(ptr, &ccs_policy_manager_list, list) {
691                  if (ptr->manager != e.manager)                  if (ptr->manager != e.manager)
692                          continue;                          continue;
# Line 701  static int ccs_update_manager_entry(cons Line 704  static int ccs_update_manager_entry(cons
704                  }                  }
705          }          }
706          mutex_unlock(&ccs_policy_lock);          mutex_unlock(&ccs_policy_lock);
707     out:
708          ccs_put_name(e.manager);          ccs_put_name(e.manager);
709          return error;          return error;
710  }  }

Legend:
Removed from v.3531  
changed lines
  Added in v.3534

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26