kernel-ark/fs/ocfs2
Joseph Qi 32e5a2a2be ocfs2: fix shift left overflow
When using a large volume, for example 9T volume with 2T already used,
frequent creation of small files with O_DIRECT when the IO is not
cluster aligned may clear sectors in the wrong place.  This will cause
filesystem corruption.

This is because p_cpos is a u32.  When calculating the corresponding
sector it should be converted to u64 first, otherwise it may overflow.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: <stable@vger.kernel.org>	[4.0+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-08-07 04:39:41 +03:00
..
cluster ocfs2: o2net: should remove debugfs in o2net_init() out branch 2015-06-24 17:49:39 -07:00
dlm ocfs2/dlm: cleanup unused function __dlm_wait_on_lockres_flags_set 2015-06-24 17:49:39 -07:00
dlmfs VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
acl.c
acl.h
alloc.c ocfs2: remove BUG_ON(!empty_extent) in __ocfs2_rotate_tree_left() 2015-06-24 17:49:39 -07:00
alloc.h
aops.c ocfs2: fix shift left overflow 2015-08-07 04:39:41 +03:00
aops.h ocfs2: remove OCFS2_IOCB_SEM lock type in direct io 2015-06-24 17:49:39 -07:00
blockcheck.c
blockcheck.h
buffer_head_io.c
buffer_head_io.h
dcache.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
dcache.h
dir.c ocfs2: use swap() in dx_leaf_sort_swap() 2015-06-24 17:49:40 -07:00
dir.h VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
dlmglue.c ocfs2: fix BUG in ocfs2_downconvert_thread_do_work() 2015-08-07 04:39:40 +03:00
dlmglue.h
export.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
export.h
extent_map.c
extent_map.h
file.c Merge branch 'for-4.2/writeback' of git://git.kernel.dk/linux-block 2015-06-25 16:00:17 -07:00
file.h
heartbeat.c
heartbeat.h
inode.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
inode.h
ioctl.c ioctl_compat: handle FITRIM 2015-07-09 11:42:21 -07:00
ioctl.h
journal.c ocfs2: mark local functions as static 2015-06-24 17:49:40 -07:00
journal.h
Kconfig
localalloc.c ocfs2: fix possible uninitialized variable access 2015-04-14 16:48:58 -07:00
localalloc.h
locks.c
locks.h
Makefile
mmap.c
mmap.h
move_extents.c
move_extents.h
namei.c ocfs2: use swap() in ocfs2_double_lock() 2015-06-24 17:49:40 -07:00
namei.h ocfs2: fix a tiny race when truncate dio orohaned entry 2015-06-24 17:49:39 -07:00
ocfs1_fs_compat.h
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
ocfs2.h ocfs2: fix wrong check in ocfs2_direct_IO_get_blocks 2015-06-24 17:49:40 -07:00
quota_global.c
quota_local.c
quota.h
refcounttree.c ocfs2: use swap() in swap_refcount_rec() 2015-06-24 17:49:40 -07:00
refcounttree.h
reservations.c
reservations.h
resize.c
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c
stackglue.h
suballoc.c ocfs2: rollback the cleared bits if error occurs after ocfs2_block_group_clear_bits 2015-04-14 16:48:58 -07:00
suballoc.h
super.c Revert "ocfs2: incorrect check for debugfs returns" 2015-04-21 09:17:28 -07:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c ocfs2: mark local functions as static 2015-06-24 17:49:40 -07:00
xattr.h