]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - security/tomoyo/realpath.c
TOMOYO: Use GFP_NOFS rather than GFP_KERNEL.
[net-next-2.6.git] / security / tomoyo / realpath.c
index cf7d61f781b9768cc8691cd3b4fc4c234a313b55..8fe3ee20a18942d0c83f49f79462a7b23952ff8f 100644 (file)
@@ -138,7 +138,7 @@ int tomoyo_realpath_from_path2(struct path *path, char *newname,
  */
 char *tomoyo_realpath_from_path(struct path *path)
 {
-       char *buf = kzalloc(sizeof(struct tomoyo_page_buffer), GFP_KERNEL);
+       char *buf = kzalloc(sizeof(struct tomoyo_page_buffer), GFP_NOFS);
 
        BUILD_BUG_ON(sizeof(struct tomoyo_page_buffer)
                     <= TOMOYO_MAX_PATHNAME_LEN - 1);
@@ -269,7 +269,7 @@ const struct tomoyo_path_info *tomoyo_get_name(const char *name)
                atomic_inc(&ptr->users);
                goto out;
        }
-       ptr = kzalloc(sizeof(*ptr) + len, GFP_KERNEL);
+       ptr = kzalloc(sizeof(*ptr) + len, GFP_NOFS);
        allocated_len = ptr ? ksize(ptr) : 0;
        if (!ptr || (tomoyo_quota_for_policy &&
                     atomic_read(&tomoyo_policy_memory_size) + allocated_len