crypto.c (c57d5621d2f2dc238f4b9c4d00b2a54187a75445) crypto.c (0dad87fcb732691bfd3183acccda6709e1e759ca)
1/**
2 * eCryptfs: Linux filesystem encryption layer
3 *
4 * Copyright (C) 1997-2004 Erez Zadok
5 * Copyright (C) 2001-2004 Stony Brook University
6 * Copyright (C) 2004-2007 International Business Machines Corp.
7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com>
8 * Michael C. Thompson <mcthomps@us.ibm.com>

--- 244 unchanged lines hidden (view full) ---

253
254 if (!(mount_crypt_stat->flags & ECRYPTFS_MOUNT_CRYPT_STAT_INITIALIZED))
255 return;
256 mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex);
257 list_for_each_entry_safe(auth_tok, auth_tok_tmp,
258 &mount_crypt_stat->global_auth_tok_list,
259 mount_crypt_stat_list) {
260 list_del(&auth_tok->mount_crypt_stat_list);
1/**
2 * eCryptfs: Linux filesystem encryption layer
3 *
4 * Copyright (C) 1997-2004 Erez Zadok
5 * Copyright (C) 2001-2004 Stony Brook University
6 * Copyright (C) 2004-2007 International Business Machines Corp.
7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com>
8 * Michael C. Thompson <mcthomps@us.ibm.com>

--- 244 unchanged lines hidden (view full) ---

253
254 if (!(mount_crypt_stat->flags & ECRYPTFS_MOUNT_CRYPT_STAT_INITIALIZED))
255 return;
256 mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex);
257 list_for_each_entry_safe(auth_tok, auth_tok_tmp,
258 &mount_crypt_stat->global_auth_tok_list,
259 mount_crypt_stat_list) {
260 list_del(&auth_tok->mount_crypt_stat_list);
261 if (auth_tok->global_auth_tok_key
262 && !(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID))
261 if (!(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID))
263 key_put(auth_tok->global_auth_tok_key);
264 kmem_cache_free(ecryptfs_global_auth_tok_cache, auth_tok);
265 }
266 mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);
267 memset(mount_crypt_stat, 0, sizeof(struct ecryptfs_mount_crypt_stat));
268}
269
270/**

--- 1896 unchanged lines hidden ---
262 key_put(auth_tok->global_auth_tok_key);
263 kmem_cache_free(ecryptfs_global_auth_tok_cache, auth_tok);
264 }
265 mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);
266 memset(mount_crypt_stat, 0, sizeof(struct ecryptfs_mount_crypt_stat));
267}
268
269/**

--- 1896 unchanged lines hidden ---