alistair23-linux/fs/ocfs2
Junxiao Bi c25a1e0671 ocfs2: fix posix_acl_create deadlock
Commit 702e5bc68a ("ocfs2: use generic posix ACL infrastructure")
refactored code to use posix_acl_create.  The problem with this function
is that it is not mindful of the cluster wide inode lock making it
unsuitable for use with ocfs2 inode creation with ACLs.  For example,
when used in ocfs2_mknod, this function can cause deadlock as follows.
The parent dir inode lock is taken when calling posix_acl_create ->
get_acl -> ocfs2_iop_get_acl which takes the inode lock again.  This can
cause deadlock if there is a blocked remote lock request waiting for the
lock to be downconverted.  And same deadlock happened in ocfs2_reflink.
This fix is to revert back using ocfs2_init_acl.

Fixes: 702e5bc68a ("ocfs2: use generic posix ACL infrastructure")
Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Joseph Qi <joseph.qi@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-12 15:52:50 -07:00
..
cluster mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
dlm ocfs2/dlm: return zero if deref_done message is successfully handled 2016-04-28 19:34:04 -07:00
dlmfs mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
acl.c ocfs2: fix posix_acl_create deadlock 2016-05-12 15:52:50 -07:00
acl.h ocfs2: fix posix_acl_create deadlock 2016-05-12 15:52:50 -07:00
alloc.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
alloc.h
aops.c mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage 2016-04-04 10:41:08 -07:00
aops.h ocfs2: fix ip_unaligned_aio deadlock with dio work queue 2016-03-25 16:37:42 -07:00
blockcheck.c
blockcheck.h
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
dir.h
dlmglue.c ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock 2016-01-21 17:20:51 -08:00
dlmglue.h
export.c
export.h
extent_map.c
extent_map.h
file.c ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang 2016-05-12 15:52:50 -07:00
file.h
filecheck.c ocfs2: sysfile interfaces for online file check 2016-03-22 15:36:02 -07:00
filecheck.h ocfs2: sysfile interfaces for online file check 2016-03-22 15:36:02 -07:00
heartbeat.c
heartbeat.h
inode.c ocfs2: record UNWRITTEN extents when populate write desc 2016-03-25 16:37:42 -07:00
inode.h ocfs2: fix ip_unaligned_aio deadlock with dio work queue 2016-03-25 16:37:42 -07:00
ioctl.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
ioctl.h
journal.c ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
journal.h
Kconfig
localalloc.c ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
localalloc.h
locks.c
locks.h
Makefile ocfs2: sysfile interfaces for online file check 2016-03-22 15:36:02 -07:00
mmap.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
mmap.h
move_extents.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
move_extents.h
namei.c ocfs2: fix posix_acl_create deadlock 2016-05-12 15:52:50 -07:00
namei.h
ocfs1_fs_compat.h
ocfs2.h mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: code clean up for direct io 2016-03-25 16:37:42 -07:00
quota.h
quota_global.c ocfs2: Fix Q_GETNEXTQUOTA for filesystem without quotas 2016-03-29 17:44:11 +02:00
quota_local.c
refcounttree.c ocfs2: fix posix_acl_create deadlock 2016-05-12 15:52:50 -07:00
refcounttree.h
reservations.c
reservations.h
resize.c ocfs2: solve a problem of crossing the boundary in updating backups 2016-03-25 16:37:42 -07:00
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c ocfs2: export ocfs2_kset for online file check 2016-03-22 15:36:02 -07:00
stackglue.h ocfs2: export ocfs2_kset for online file check 2016-03-22 15:36:02 -07:00
suballoc.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
suballoc.h
super.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
super.h ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local 2016-03-25 16:37:42 -07:00
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c ocfs2: fix posix_acl_create deadlock 2016-05-12 15:52:50 -07:00
xattr.h ocfs2: fix posix_acl_create deadlock 2016-05-12 15:52:50 -07:00