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 ocfs2: remove unnecessary else in ocfs2_set_acl() 2015-02-10 14:30:28 -08:00
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 ocfs2: reflink: fix slow unlink for refcounted file 2014-12-18 19:08:11 -08:00
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 ocfs2: prepare some interfaces used in append direct io 2015-02-16 17:56:04 -08:00
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 ocfs2: wait for orphan recovery first once append O_DIRECT write crash 2015-02-16 17:56:05 -08:00
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 ocfs2: add functions to add and remove inode in orphan dir 2015-02-16 17:56:04 -08:00
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 mm: drop vm_ops->remap_pages and generic_file_remap_pages() stub 2015-02-10 14:30:30 -08:00
mmap.h
move_extents.c ocfs2: remove bogus NULL check in ocfs2_move_extents() 2014-12-10 17:41:04 -08:00
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: make append_dio an incompat feature 2015-03-12 18:46:07 -07:00
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 Merge branch 'akpm' (patches from Andrew) 2015-02-10 16:45:56 -08:00
quota.h ocfs2: Move OLQF_CLEAN flag out of generic quota flags 2015-01-21 19:21:30 +01:00
refcounttree.c ocfs2: use swap() in swap_refcount_rec() 2015-06-24 17:49:40 -07:00
refcounttree.h
reservations.c ocfs2: make resv_lock spinlock static 2015-02-10 14:30:29 -08:00
reservations.h
resize.c
resize.h
slot_map.c ocfs2: one function call less in ocfs2_init_slot_info() after error detection 2015-04-14 16:48:57 -07:00
slot_map.h
stack_o2cb.c ocfs2: avoid a pointless delay in o2cb_cluster_check() 2015-04-14 16:48:57 -07:00
stack_user.c ocfs2: one function call less in user_cluster_connect() after error detection 2015-04-14 16:48:57 -07:00
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