crypto.c (bd0561c9d8dcbf21cd9aa46c416bbf6a3a12e4b1) | crypto.c (c376222960ae91d5ffb9197ee36771aaed1d9f90) |
---|---|
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-2006 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompson <mcthomps@us.ibm.com> --- 1318 unchanged lines hidden (view full) --- 1327 } 1328 } else { 1329 rc = -EINVAL; 1330 ecryptfs_printk(KERN_WARNING, 1331 "Called with crypt_stat->encrypted == 0\n"); 1332 goto out; 1333 } 1334 /* Released in this function */ | 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-2006 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompson <mcthomps@us.ibm.com> --- 1318 unchanged lines hidden (view full) --- 1327 } 1328 } else { 1329 rc = -EINVAL; 1330 ecryptfs_printk(KERN_WARNING, 1331 "Called with crypt_stat->encrypted == 0\n"); 1332 goto out; 1333 } 1334 /* Released in this function */ |
1335 page_virt = kmem_cache_alloc(ecryptfs_header_cache_0, GFP_USER); | 1335 page_virt = kmem_cache_zalloc(ecryptfs_header_cache_0, GFP_USER); |
1336 if (!page_virt) { 1337 ecryptfs_printk(KERN_ERR, "Out of memory\n"); 1338 rc = -ENOMEM; 1339 goto out; 1340 } | 1336 if (!page_virt) { 1337 ecryptfs_printk(KERN_ERR, "Out of memory\n"); 1338 rc = -ENOMEM; 1339 goto out; 1340 } |
1341 memset(page_virt, 0, PAGE_CACHE_SIZE); | 1341 |
1342 rc = ecryptfs_write_headers_virt(page_virt, crypt_stat, 1343 ecryptfs_dentry); 1344 if (unlikely(rc)) { 1345 ecryptfs_printk(KERN_ERR, "Error whilst writing headers\n"); 1346 memset(page_virt, 0, PAGE_CACHE_SIZE); 1347 goto out_free; 1348 } 1349 ecryptfs_printk(KERN_DEBUG, --- 323 unchanged lines hidden --- | 1342 rc = ecryptfs_write_headers_virt(page_virt, crypt_stat, 1343 ecryptfs_dentry); 1344 if (unlikely(rc)) { 1345 ecryptfs_printk(KERN_ERR, "Error whilst writing headers\n"); 1346 memset(page_virt, 0, PAGE_CACHE_SIZE); 1347 goto out_free; 1348 } 1349 ecryptfs_printk(KERN_DEBUG, --- 323 unchanged lines hidden --- |