diff options
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; | |||
265 | */ | 265 | */ |
266 | #define TOMOYO_MAX_HASH 256 | 266 | #define TOMOYO_MAX_HASH 256 |
267 | 267 | ||
268 | /* Structure for string data. */ | 268 | /* |
269 | * tomoyo_name_entry is a structure which is used for linking | ||
270 | * "struct tomoyo_path_info" into tomoyo_name_list . | ||
271 | * | ||
272 | * Since tomoyo_name_list manages a list of strings which are shared by | ||
273 | * multiple processes (whereas "struct tomoyo_path_info" inside | ||
274 | * "struct tomoyo_path_info_with_data" is not shared), a reference counter will | ||
275 | * be added to "struct tomoyo_name_entry" rather than "struct tomoyo_path_info" | ||
276 | * when TOMOYO starts supporting garbage collector. | ||
277 | */ | ||
269 | struct tomoyo_name_entry { | 278 | struct tomoyo_name_entry { |
270 | struct list_head list; | 279 | struct list_head list; |
271 | struct tomoyo_path_info entry; | 280 | struct tomoyo_path_info entry; |
@@ -279,10 +288,10 @@ struct tomoyo_free_memory_block_list { | |||
279 | }; | 288 | }; |
280 | 289 | ||
281 | /* | 290 | /* |
282 | * The list for "struct tomoyo_name_entry". | 291 | * tomoyo_name_list is used for holding string data used by TOMOYO. |
283 | * | 292 | * Since same string data is likely used for multiple times (e.g. |
284 | * This list is updated only inside tomoyo_save_name(), thus | 293 | * "/lib/libc-2.5.so"), TOMOYO shares string data in the form of |
285 | * no global mutex exists. | 294 | * "const struct tomoyo_path_info *". |
286 | */ | 295 | */ |
287 | static struct list_head tomoyo_name_list[TOMOYO_MAX_HASH]; | 296 | static struct list_head tomoyo_name_list[TOMOYO_MAX_HASH]; |
288 | 297 | ||