linux/fs
Eric Sandeen 7fcba05437 eCryptfs: use page_alloc not kmalloc to get a page of memory
With SLUB debugging turned on in 2.6.26, I was getting memory corruption
when testing eCryptfs.  The root cause turned out to be that eCryptfs was
doing kmalloc(PAGE_CACHE_SIZE); virt_to_page() and treating that as a nice
page-aligned chunk of memory.  But at least with SLUB debugging on, this
is not always true, and the page we get from virt_to_page does not
necessarily match the PAGE_CACHE_SIZE worth of memory we got from kmalloc.

My simple testcase was 2 loops doing "rm -f fileX; cp /tmp/fileX ." for 2
different multi-megabyte files.  With this change I no longer see the
corruption.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Acked-by: Michael Halcrow <mhalcrow@us.ibm.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-28 16:30:21 -07:00
..
9p
adfs
affs [PATCH] f_count may wrap around 2008-07-26 20:53:40 -04:00
afs [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
autofs
autofs4
befs
bfs
cifs [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
coda [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
configfs
cramfs
debugfs
devpts
dlm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm 2008-07-28 09:46:00 -07:00
ecryptfs eCryptfs: use page_alloc not kmalloc to get a page of memory 2008-07-28 16:30:21 -07:00
efs
exportfs
ext2 vfs: pagecache usage optimization for pagesize!=blocksize 2008-07-28 16:30:21 -07:00
ext3 vfs: pagecache usage optimization for pagesize!=blocksize 2008-07-28 16:30:21 -07:00
ext4 vfs: pagecache usage optimization for pagesize!=blocksize 2008-07-28 16:30:21 -07:00
fat [patch 3/4] fat: dont call notify_change 2008-07-26 20:53:27 -04:00
freevxfs
fuse [PATCH] fix MAY_CHDIR/MAY_ACCESS/LOOKUP_ACCESS mess 2008-07-26 20:53:21 -04:00
gfs2 [PATCH] don't pass nameidata to gfs2_lookupi() 2008-07-26 20:53:36 -04:00
hfs [PATCH] f_count may wrap around 2008-07-26 20:53:40 -04:00
hfsplus [PATCH] f_count may wrap around 2008-07-26 20:53:40 -04:00
hostfs [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
hpfs [patch 05/14] hpfs: dont call permission() 2008-07-26 20:53:13 -04:00
hppfs [patch] hppfs: remove hppfs_permission 2008-07-26 20:53:07 -04:00
hugetlbfs
isofs
jbd
jbd2
jffs2 Merge git://git.infradead.org/mtd-2.6 2008-07-26 20:30:56 -07:00
jfs [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
lockd
minix
msdos
ncpfs [PATCH] don't pass nameidata to __ncp_lookup_validate() 2008-07-26 20:53:37 -04:00
nfs NFS: Ensure we call nfs_sb_deactive() after releasing the directory inode 2008-07-27 18:20:51 -04:00
nfs_common
nfsd [PATCH] get rid of indirect users of namei.h 2008-07-26 20:53:42 -04:00
nls
ntfs [patch 3/5] vfs: change remove_suid() to file_remove_suid() 2008-07-26 20:53:16 -04:00
ocfs2 [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
omfs
openpromfs
partitions
proc task IO accounting: move all IO statistics in struct task_io_accounting 2008-07-27 16:12:28 -07:00
qnx4
ramfs
reiserfs [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
romfs
smbfs [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
sysfs
sysv
ubifs [PATCH] get rid of indirect users of namei.h 2008-07-26 20:53:42 -04:00
udf
ufs
vfat
xfs [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
aio.c [PATCH] f_count may wrap around 2008-07-26 20:53:40 -04:00
anon_inodes.c
attr.c [patch 4/4] vfs: immutable inode checking cleanup 2008-07-26 20:53:28 -04:00
bad_inode.c [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
binfmt_aout.c tracehook: exec 2008-07-26 12:00:08 -07:00
binfmt_elf_fdpic.c binfmt_elf_fdpic: Magical stack pointer index, for NEW_AUX_ENT compat. 2008-07-28 18:10:28 +09:00
binfmt_elf.c tracehook: exec 2008-07-26 12:00:08 -07:00
binfmt_em86.c
binfmt_flat.c tracehook: exec 2008-07-26 12:00:08 -07:00
binfmt_misc.c
binfmt_script.c
binfmt_som.c tracehook: exec 2008-07-26 12:00:08 -07:00
bio-integrity.c bio-integrity: remove EXPORT_SYMBOL for bio_integrity_init_slab() 2008-07-28 16:30:21 -07:00
bio.c
block_dev.c
buffer.c vfs: pagecache usage optimization for pagesize!=blocksize 2008-07-28 16:30:21 -07:00
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c exec: include pagemap.h again to fix build 2008-07-28 16:30:20 -07:00
fcntl.c [PATCH] fix RLIM_NOFILE handling 2008-07-26 20:53:45 -04:00
fifo.c [PATCH] reuse xxx_fifo_fops for xxx_pipe_fops 2008-07-26 20:53:06 -04:00
file_table.c [PATCH] f_count may wrap around 2008-07-26 20:53:40 -04:00
file.c [PATCH] fix RLIM_NOFILE handling 2008-07-26 20:53:45 -04:00
filesystems.c
fs-writeback.c
generic_acl.c
inode.c
inotify_user.c [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
inotify.c
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt sh: Initial ELF FDPIC support. 2008-07-28 18:10:28 +09:00
libfs.c
locks.c
Makefile
mbcache.c
mpage.c
namei.c [PATCH] get rid of __user_path_lookup_open 2008-07-26 20:53:41 -04:00
namespace.c [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
nfsctl.c
no-block.c
open.c [PATCH] fix RLIM_NOFILE handling 2008-07-26 20:53:45 -04:00
pipe.c [PATCH] reuse xxx_fifo_fops for xxx_pipe_fops 2008-07-26 20:53:06 -04:00
pnode.c
pnode.h
posix_acl.c
quota_v1.c
quota_v2.c
quota.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c [patch 3/5] vfs: change remove_suid() to file_remove_suid() 2008-07-26 20:53:16 -04:00
stack.c
stat.c [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
super.c
sync.c
timerfd.c
utimes.c [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
xattr_acl.c
xattr.c [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00