tree: https://github.com/davejiang/linux.git davejiang/nvdimm-dev head: 499845cef966ebe205acf29e364afe5f5611fa93 commit: 69495617fee9d903a5d17a7d1bd54189432c91fc [43/220] ocfs2: fix deadlocks when taking inode lock at vfs entry points config: i386-randconfig-s0-201704 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout 69495617fee9d903a5d17a7d1bd54189432c91fc # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32 Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_inc Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_dec_and_test Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR Cyclomatic Complexity 2 include/linux/err.h:IS_ERR Cyclomatic Complexity 1 include/linux/uidgid.h:__kuid_val Cyclomatic Complexity 1 include/linux/uidgid.h:__kgid_val Cyclomatic Complexity 1 include/linux/uidgid.h:make_kuid Cyclomatic Complexity 1 include/linux/uidgid.h:make_kgid Cyclomatic Complexity 1 include/linux/uidgid.h:from_kuid Cyclomatic Complexity 1 include/linux/uidgid.h:from_kgid Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large Cyclomatic Complexity 3 include/linux/slab.h:kmalloc Cyclomatic Complexity 1 include/linux/buffer_head.h:get_bh Cyclomatic Complexity 2 include/linux/buffer_head.h:brelse Cyclomatic Complexity 1 fs/ocfs2/inode.h:OCFS2_I Cyclomatic Complexity 1 fs/ocfs2/inode.h:INODE_CACHE Cyclomatic Complexity 2 fs/ocfs2/journal.h:ocfs2_update_inode_fsync_trans Cyclomatic Complexity 4 include/linux/posix_acl.h:posix_acl_release Cyclomatic Complexity 5 fs/ocfs2/acl.c:ocfs2_acl_to_xattr Cyclomatic Complexity 19 fs/ocfs2/acl.c:ocfs2_acl_set_mode Cyclomatic Complexity 7 fs/ocfs2/acl.c:ocfs2_acl_from_xattr Cyclomatic Complexity 7 fs/ocfs2/acl.c:ocfs2_get_acl_nolock Cyclomatic Complexity 12 fs/ocfs2/acl.c:ocfs2_set_acl Cyclomatic Complexity 10 fs/ocfs2/acl.c:ocfs2_iop_set_acl Cyclomatic Complexity 11 fs/ocfs2/acl.c:ocfs2_iop_get_acl Cyclomatic Complexity 6 fs/ocfs2/acl.c:ocfs2_acl_chmod Cyclomatic Complexity 21 fs/ocfs2/acl.c:ocfs2_init_acl In file included from fs/ocfs2/acl.c:31:0: fs/ocfs2/acl.c: In function 'ocfs2_iop_set_acl': >> fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres); ^~~~~~~~~~~~~~~~~~~~~ fs/ocfs2/acl.c:292:16: note: called from here has_locked = (ocfs2_is_locked_by_me(lockres) != NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/ocfs2/acl.c:31:0: >> fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres); ^~~~~~~~~~~~~~~~~~~~~ fs/ocfs2/acl.c:292:16: note: called from here has_locked = (ocfs2_is_locked_by_me(lockres) != NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/ocfs2/acl.c:31:0: >> fs/ocfs2/dlmglue.h:185:13: error: inlining failed in call to always_inline 'ocfs2_add_holder': function body not available inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres, ^~~~~~~~~~~~~~~~ fs/ocfs2/acl.c:302:3: note: called from here ocfs2_add_holder(lockres, &oh); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/ocfs2/acl.c:31:0: >> fs/ocfs2/dlmglue.h:187:13: error: inlining failed in call to always_inline 'ocfs2_remove_holder': function body not available inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres, ^~~~~~~~~~~~~~~~~~~ fs/ocfs2/acl.c:307:3: note: called from here ocfs2_remove_holder(lockres, &oh); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Cyclomatic Complexity 7 include/linux/quotaops.h:is_quota_modification Cyclomatic Complexity 1 include/linux/quotaops.h:dquot_alloc_space_nodirty Cyclomatic Complexity 1 include/linux/quotaops.h:dquot_free_space_nodirty Cyclomatic Complexity 1 include/linux/quotaops.h:dquot_free_space Cyclomatic Complexity 2 include/linux/buffer_head.h:brelse Cyclomatic Complexity 3 fs/ocfs2/ocfs2.h:ocfs2_should_order_data Cyclomatic Complexity 2 fs/ocfs2/ocfs2.h:ocfs2_sparse_alloc Cyclomatic Complexity 3 fs/ocfs2/ocfs2.h:ocfs2_writes_unwritten_extents Cyclomatic Complexity 2 fs/ocfs2/ocfs2.h:ocfs2_refcount_tree Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_is_hard_readonly Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_is_soft_readonly Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_clusters_to_blocks Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_blocks_to_clusters Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_clusters_for_bytes Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_blocks_for_bytes Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_clusters_to_bytes Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_align_bytes_to_clusters Cyclomatic Complexity 1 fs/ocfs2/ocfs2.h:ocfs2_align_bytes_to_blocks Cyclomatic Complexity 1 fs/ocfs2/alloc.h:ocfs2_extend_meta_needed Cyclomatic Complexity 1 fs/ocfs2/alloc.h:ocfs2_init_dealloc_ctxt Cyclomatic Complexity 2 fs/ocfs2/alloc.h:ocfs2_rec_clusters Cyclomatic Complexity 2 fs/ocfs2/aops.h:ocfs2_iocb_set_rw_locked Cyclomatic Complexity 1 fs/ocfs2/inode.h:OCFS2_I Cyclomatic Complexity 1 fs/ocfs2/inode.h:INODE_CACHE Cyclomatic Complexity 1 fs/ocfs2/inode.h:ocfs2_inode_sector_count Cyclomatic Complexity 1 fs/ocfs2/inode.h:ocfs2_is_refcount_inode Cyclomatic Complexity 3 fs/ocfs2/journal.h:ocfs2_quota_trans_credits Cyclomatic Complexity 1 fs/ocfs2/journal.h:ocfs2_calc_extend_credits Cyclomatic Complexity 1 fs/ocfs2/journal.h:ocfs2_jbd2_file_inode Cyclomatic Complexity 1 fs/ocfs2/journal.h:ocfs2_begin_ordered_truncate Cyclomatic Complexity 2 fs/ocfs2/journal.h:ocfs2_update_inode_fsync_trans Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_file_open Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_file_release Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_sync_file Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_file_aio_write Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_file_aio_read Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_truncate_file Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_truncate_file_error Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_extend_allocation Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_extend_allocation_end Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_write_zero_page Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_zero_extend_range Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_zero_extend Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_setattr Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_write_remove_suid Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_zero_partial_clusters Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_zero_partial_clusters_range1 Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_zero_partial_clusters_range2 Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_remove_inode_range Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_ocfs2_prepare_inode_for_write Cyclomatic Complexity 6 fs/ocfs2/ocfs2_trace.h:trace_generic_file_aio_read_ret Cyclomatic Complexity 3 fs/ocfs2/file.c:ocfs2_find_rec Cyclomatic Complexity 5 fs/ocfs2/file.c:ocfs2_calc_trunc_pos Cyclomatic Complexity 3 fs/ocfs2/file.c:ocfs2_is_io_unaligned Cyclomatic Complexity 19 fs/ocfs2/file.c:ocfs2_zero_start_ordered_transaction Cyclomatic Complexity 12 fs/ocfs2/file.c:__ocfs2_write_remove_suid Cyclomatic Complexity 21 fs/ocfs2/file.c:ocfs2_zero_partial_clusters Cyclomatic Complexity 8 fs/ocfs2/file.c:ocfs2_cow_file_pos Cyclomatic Complexity 21 fs/ocfs2/file.c:ocfs2_orphan_for_truncate Cyclomatic Complexity 27 fs/ocfs2/file.c:ocfs2_zero_extend_get_range Cyclomatic Complexity 6 fs/ocfs2/file.c:ocfs2_write_remove_suid Cyclomatic Complexity 24 fs/ocfs2/file.c:ocfs2_write_zero_page Cyclomatic Complexity 9 fs/ocfs2/file.c:ocfs2_zero_extend_range Cyclomatic Complexity 11 fs/ocfs2/file.c:ocfs2_prepare_inode_for_refcount Cyclomatic Complexity 8 fs/ocfs2/file.c:ocfs2_getattr Cyclomatic Complexity 10 fs/ocfs2/file.c:ocfs2_permission Cyclomatic Complexity 2 fs/ocfs2/file.c:ocfs2_truncate_cluster_pages Cyclomatic Complexity 2 fs/ocfs2/file.c:ocfs2_file_dedupe_range Cyclomatic Complexity 1 fs/ocfs2/file.c:ocfs2_file_clone_range Cyclomatic Complexity 15 fs/ocfs2/file.c:ocfs2_sync_file Cyclomatic Complexity 2 fs/ocfs2/file.c:ocfs2_free_file_private Cyclomatic Complexity 2 fs/ocfs2/file.c:ocfs2_file_release Cyclomatic Complexity 1 fs/ocfs2/file.c:ocfs2_dir_release Cyclomatic Complexity 2 fs/ocfs2/file.c:ocfs2_init_file_private Cyclomatic Complexity 6 fs/ocfs2/file.c:ocfs2_file_open Cyclomatic Complexity 1 fs/ocfs2/file.c:ocfs2_dir_open Cyclomatic Complexity 27 fs/ocfs2/file.c:ocfs2_file_read_iter Cyclomatic Complexity 13 fs/ocfs2/file.c:ocfs2_file_llseek Cyclomatic Complexity 14 fs/ocfs2/file.c:ocfs2_should_update_atime Cyclomatic Complexity 11 fs/ocfs2/file.c:ocfs2_update_inode_atime Cyclomatic Complexity 6 fs/ocfs2/file.c:ocfs2_set_inode_size Cyclomatic Complexity 11 fs/ocfs2/file.c:ocfs2_simple_size_update Cyclomatic Complexity 26 fs/ocfs2/file.c:ocfs2_truncate_file Cyclomatic Complexity 1 fs/ocfs2/file.c:ocfs2_add_inode_data Cyclomatic Complexity 44 fs/ocfs2/file.c:__ocfs2_extend_allocation Cyclomatic Complexity 27 fs/ocfs2/file.c:ocfs2_allocate_unwritten_extents Cyclomatic Complexity 1 fs/ocfs2/file.c:ocfs2_extend_allocation Cyclomatic Complexity 15 fs/ocfs2/file.c:ocfs2_zero_extend Cyclomatic Complexity 22 fs/ocfs2/file.c:ocfs2_extend_no_holes Cyclomatic Complexity 22 fs/ocfs2/file.c:ocfs2_extend_file Cyclomatic Complexity 72 fs/ocfs2/file.c:ocfs2_setattr Cyclomatic Complexity 49 fs/ocfs2/file.c:ocfs2_remove_inode_range Cyclomatic Complexity 53 fs/ocfs2/file.c:__ocfs2_change_file_space Cyclomatic Complexity 5 fs/ocfs2/file.c:ocfs2_fallocate Cyclomatic Complexity 8 fs/ocfs2/file.c:ocfs2_change_file_space Cyclomatic Complexity 13 fs/ocfs2/file.c:ocfs2_check_range_for_refcount Cyclomatic Complexity 20 fs/ocfs2/file.c:ocfs2_prepare_inode_for_write Cyclomatic Complexity 51 fs/ocfs2/file.c:ocfs2_file_write_iter In file included from fs/ocfs2/file.c:49:0: fs/ocfs2/file.c: In function 'ocfs2_permission': >> fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres); ^~~~~~~~~~~~~~~~~~~~~ fs/ocfs2/file.c:1345:16: note: called from here has_locked = (ocfs2_is_locked_by_me(lockres) != NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/ocfs2/file.c:49:0: >> fs/ocfs2/dlmglue.h:189:29: error: inlining failed in call to always_inline 'ocfs2_is_locked_by_me': function body not available inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres); ^~~~~~~~~~~~~~~~~~~~~ fs/ocfs2/file.c:1345:16: note: called from here has_locked = (ocfs2_is_locked_by_me(lockres) != NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/ocfs2/file.c:49:0: >> fs/ocfs2/dlmglue.h:185:13: error: inlining failed in call to always_inline 'ocfs2_add_holder': function body not available inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres, ^~~~~~~~~~~~~~~~ fs/ocfs2/file.c:1353:3: note: called from here ocfs2_add_holder(lockres, &oh); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from fs/ocfs2/file.c:49:0: >> fs/ocfs2/dlmglue.h:187:13: error: inlining failed in call to always_inline 'ocfs2_remove_holder': function body not available inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres, ^~~~~~~~~~~~~~~~~~~ fs/ocfs2/file.c:1359:3: note: called from here ocfs2_remove_holder(lockres, &oh); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/ocfs2_is_locked_by_me +189 fs/ocfs2/dlmglue.h 63e0c48a Joel Becker 2008-01-30 179 void ocfs2_set_locking_protocol(void); e7a8d390 Eric Ren 2017-01-10 180 e7a8d390 Eric Ren 2017-01-10 181 /* e7a8d390 Eric Ren 2017-01-10 182 * Keep a list of processes who have interest in a lockres. e7a8d390 Eric Ren 2017-01-10 183 * Note: this is now only uesed for check recursive cluster lock. e7a8d390 Eric Ren 2017-01-10 184 */ e7a8d390 Eric Ren 2017-01-10 @185 inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres, e7a8d390 Eric Ren 2017-01-10 186 struct ocfs2_holder *oh); e7a8d390 Eric Ren 2017-01-10 @187 inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres, e7a8d390 Eric Ren 2017-01-10 188 struct ocfs2_holder *oh); e7a8d390 Eric Ren 2017-01-10 @189 inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct ocfs2_lock_res *lockres); e7a8d390 Eric Ren 2017-01-10 190 ccd979bd Mark Fasheh 2005-12-15 191 #endif /* DLMGLUE_H */ :::::: The code at line 189 was first introduced by commit :::::: e7a8d390cb9c81c1c9ee6b6b8774a5eadc42c3f8 ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock :::::: TO: Eric Ren <zren@xxxxxxxx> :::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip