diff options
author | Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> | 2009-06-08 12:37:39 +0900 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-06-09 09:30:24 +1000 |
commit | c3fa109a5894077d1eaf8731ea741a15dd117b3c (patch) | |
tree | a3d5f58ea878868b48a1493055e6f2cb6dd3c9de /security/tomoyo/realpath.c | |
parent | 5bf1692f65c12a8aa359dc883468284ffc3c4587 (diff) | |
download | linux-c3fa109a5894077d1eaf8731ea741a15dd117b3c.tar.gz linux-c3fa109a5894077d1eaf8731ea741a15dd117b3c.tar.bz2 linux-c3fa109a5894077d1eaf8731ea741a15dd117b3c.zip |
TOMOYO: Add description of lists and structures.
This patch adds some descriptions of lists and structures.
This patch contains no code changes.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/realpath.c')
-rw-r--r-- | security/tomoyo/realpath.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index 3948f6b56ae2..5f2e33263371 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c @@ -265,7 +265,16 @@ static unsigned int tomoyo_quota_for_savename; */ #define TOMOYO_MAX_HASH 256 -/* Structure for string data. */ +/* + * tomoyo_name_entry is a structure which is used for linking + * "struct tomoyo_path_info" into tomoyo_name_list . + * + * Since tomoyo_name_list manages a list of strings which are shared by + * multiple processes (whereas "struct tomoyo_path_info" inside + * "struct tomoyo_path_info_with_data" is not shared), a reference counter will + * be added to "struct tomoyo_name_entry" rather than "struct tomoyo_path_info" + * when TOMOYO starts supporting garbage collector. + */ struct tomoyo_name_entry { struct list_head list; struct tomoyo_path_info entry; @@ -279,10 +288,10 @@ struct tomoyo_free_memory_block_list { }; /* - * The list for "struct tomoyo_name_entry". - * - * This list is updated only inside tomoyo_save_name(), thus - * no global mutex exists. + * tomoyo_name_list is used for holding string data used by TOMOYO. + * Since same string data is likely used for multiple times (e.g. + * "/lib/libc-2.5.so"), TOMOYO shares string data in the form of + * "const struct tomoyo_path_info *". */ static struct list_head tomoyo_name_list[TOMOYO_MAX_HASH]; |