linux/fs/ecryptfs
Michael Halcrow 240e2df5c7 eCryptfs: fix write zeros behavior
This patch fixes the processes involved in wiping regions of the data during
truncate and write events, fixing a kernel hang in 2.6.22-rc4 while assuring
that zero values are written out to the appropriate locations during events in
which the i_size will change.

The range passed to ecryptfs_truncate() from ecryptfs_prepare_write() includes
the page that is the object of ecryptfs_prepare_write().  This leads to a
kernel hang as read_cache_page() is executed on the same page in the
ecryptfs_truncate() execution path.  This patch remedies this by limiting the
range passed to ecryptfs_truncate() so as to exclude the page that is the
object of ecryptfs_prepare_write(); it also adds code to
ecryptfs_prepare_write() to zero out the region of its own page when writing
past the i_size position.  This patch also modifies ecryptfs_truncate() so
that when a file is truncated to a smaller size, eCryptfs will zero out the
contents of the new last page from the new size through to the end of the last
page.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-28 11:34:53 -07:00
..
Makefile [PATCH] eCryptfs: Public key; packet management 2007-02-12 09:48:36 -08:00
crypto.c [PATCH] eCryptfs: open-code flag checking and manipulation 2007-02-12 09:48:37 -08:00
debug.c [PATCH] eCryptfs: open-code flag checking and manipulation 2007-02-12 09:48:37 -08:00
dentry.c [PATCH] eCryptfs: fix possible NULL ptr deref in ecryptfs_d_release() 2007-03-16 19:25:05 -07:00
ecryptfs_kernel.h eCryptfs: fix write zeros behavior 2007-06-28 11:34:53 -07:00
file.c eCryptfs: delay writing 0's after llseek until write 2007-05-23 20:14:15 -07:00
inode.c eCryptfs: fix write zeros behavior 2007-06-28 11:34:53 -07:00
keystore.c [PATCH] eCryptfs: Reduce stack usage in ecryptfs_generate_key_packet_set() 2007-02-16 08:14:01 -08:00
main.c Remove SLAB_CTOR_CONSTRUCTOR 2007-05-17 05:23:04 -07:00
messaging.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
mmap.c eCryptfs: fix write zeros behavior 2007-06-28 11:34:53 -07:00
netlink.c [NETLINK]: Switch cb_lock spinlock to mutex and allow to override it 2007-04-25 22:29:03 -07:00
super.c [PATCH] Mark struct super_operations const 2007-02-12 09:48:47 -08:00