summaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
authorJoseph Qi2015-08-07 00:46:48 +0200
committerLinus Torvalds2015-08-07 03:39:41 +0200
commit32e5a2a2be6b085febaac36efff495ad65a55e6c (patch)
tree7b491fbda572fa03a6a0fbb3dc650e2e09fe7cf6 /ipc/shm.c
parentkthread: export kthread functions (diff)
downloadkernel-qcow2-linux-32e5a2a2be6b085febaac36efff495ad65a55e6c.tar.gz
kernel-qcow2-linux-32e5a2a2be6b085febaac36efff495ad65a55e6c.tar.xz
kernel-qcow2-linux-32e5a2a2be6b085febaac36efff495ad65a55e6c.zip
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>
Diffstat (limited to 'ipc/shm.c')
0 files changed, 0 insertions, 0 deletions