1
0
Fork 0
remarkable-linux/fs/ocfs2
Junxiao Bi 631598a5c0 ocfs2: fix posix_acl_create deadlock
[ Upstream commit c25a1e0671 ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2016-05-17 13:43:14 -04:00
..
cluster Revert "ocfs2: incorrect check for debugfs returns" 2015-04-21 09:17:28 -07:00
dlm ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list 2016-04-18 08:51:09 -04:00
dlmfs VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
Kconfig
Makefile ocfs2: remove versioning information 2014-01-21 16:19:41 -08:00
acl.c ocfs2: fix posix_acl_create deadlock 2016-05-17 13:43:14 -04:00
acl.h ocfs2: fix posix_acl_create deadlock 2016-05-17 13:43:14 -04:00
alloc.c ocfs2: one function call less in ocfs2_merge_rec_right() after error detection 2015-04-14 16:48:57 -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-16 20:52:22 -07:00
aops.h fs: move struct kiocb to fs.h 2015-03-25 20:28:11 -04:00
blockcheck.c ocfs2: kill endianness abuses in blockcheck.c 2012-05-29 23:28:35 -04:00
blockcheck.h
buffer_head_io.c ocfs2: do not put bh when buffer_uptodate failed 2014-04-03 16:20:56 -07:00
buffer_head_io.h
dcache.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
dcache.h ocfs2: revert iput deferring code in ocfs2_drop_dentry_lock 2014-04-03 16:20:55 -07:00
dir.c ocfs2: fix a typo in the copyright statement 2015-04-14 16:48:58 -07:00
dir.h VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
dlmglue.c ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock 2016-02-15 15:45:19 -05:00
dlmglue.h ocfs2: avoid blocking in ocfs2_mark_lockres_freeing() in downconvert thread 2014-04-03 16:20:55 -07:00
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 ocfs2: fix the end cluster offset of FIEMAP 2013-09-11 15:56:53 -07:00
extent_map.h ocfs2: Implement llseek() 2011-07-25 14:58:15 -07:00
file.c ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang 2016-05-17 13:43:13 -04: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 ocfs2: do not write error flag to user structure we cannot copy from/to 2014-08-29 16:28:16 -07:00
ioctl.h
journal.c ocfs2: wait for orphan recovery first once append O_DIRECT write crash 2015-02-16 17:56:05 -08:00
journal.h ocfs2: add functions to add and remove inode in orphan dir 2015-02-16 17:56:04 -08:00
localalloc.c ocfs2: fix possible uninitialized variable access 2015-04-14 16:48:58 -07:00
localalloc.h ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters 2014-02-06 13:48:51 -08:00
locks.c ocfs2: flock: drop cross-node lock when failed locally 2014-04-03 16:20:56 -07:00
locks.h
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 Ocfs2/move_extents: move/defrag extents within a certain range. 2011-05-25 15:17:12 +08:00
namei.c ocfs2: fix posix_acl_create deadlock 2016-05-17 13:43:14 -04:00
namei.h ocfs2: add functions to add and remove inode in orphan dir 2015-02-16 17:56:04 -08:00
ocfs1_fs_compat.h
ocfs2.h ocfs2: make append_dio an incompat feature 2015-03-12 18:46:07 -07:00
ocfs2_fs.h ocfs2: make append_dio an incompat feature 2015-03-12 18:46:07 -07:00
ocfs2_ioctl.h Ocfs2/move_extents: Adding new ioctl code 'OCFS2_IOC_MOVE_EXT' to ocfs2. 2011-05-25 15:17:08 +08:00
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: fix a tiny race when running dirop_fileop_racer 2014-06-23 16:47:45 -07:00
quota.h ocfs2: Move OLQF_CLEAN flag out of generic quota flags 2015-01-21 19:21:30 +01:00
quota_global.c ocfs2: Don't use MAXQUOTAS value 2014-09-17 11:59:12 +02:00
quota_local.c Merge branch 'akpm' (patches from Andrew) 2015-02-10 16:45:56 -08:00
refcounttree.c ocfs2: fix posix_acl_create deadlock 2016-05-17 13:43:14 -04:00
refcounttree.h ocfs2: fix NULL pointer dereference in ocfs2_duplicate_clusters_by_page 2013-08-13 17:57:49 -07:00
reservations.c ocfs2: make resv_lock spinlock static 2015-02-10 14:30:29 -08:00
reservations.h Fix common misspellings 2011-03-31 11:26:23 -03:00
resize.c ocfs2: fix incorrect i_size of global bitmap inode after resize 2014-06-04 16:53:54 -07:00
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 ocfs2: remove NULL assignments on static 2014-06-04 16:53:53 -07:00
stackglue.h ocfs2: pass ocfs2_cluster_connection to ocfs2_this_node 2014-01-21 16:19:41 -08:00
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 ocfs2: rollback alloc_dinode counts when ocfs2_block_group_set_bits() failed 2014-04-03 16:20:56 -07:00
super.c fs: create and use seq_show_option for escaping 2015-09-21 10:05:45 -07:00
super.h treewide: use __printf not __attribute__((format(printf,...))) 2011-10-31 17:30:54 -07:00
symlink.c ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path 2013-02-26 02:46:12 -05:00
symlink.h ocfs: simplify symlink handling 2012-05-29 23:28:40 -04:00
sysfile.c ocfs2: avoid system inode ref confusion by adding mutex lock 2014-04-03 16:20:57 -07:00
sysfile.h
uptodate.c ocfs2: remove NULL assignments on static 2014-06-04 16:53:53 -07:00
uptodate.h
xattr.c ocfs2: fix posix_acl_create deadlock 2016-05-17 13:43:14 -04:00
xattr.h ocfs2: fix posix_acl_create deadlock 2016-05-17 13:43:14 -04:00