CC: kbuild-...@lists.01.org CC: linux-e...@vger.kernel.org TO: "Ritesh, Harjani," <rite...@linux.ibm.com> CC: "Theodore Ts'o" <ty...@mit.edu>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev head: 38bd76b9696c5582dcef4ab1af437e0666021f65 commit: bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 [43/50] ext4: mballoc: use lock for checking free blocks while retrying :::::: branch date: 21 hours ago :::::: commit date: 22 hours ago config: x86_64-randconfig-s022-20200529 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-243-gc100a7ab-dirty git checkout bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 # save the attached .config to linux build tree make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <l...@intel.com> sparse warnings: (new ones prefixed by >>) >> fs/ext4/mballoc.c:2209:9: sparse: sparse: context imbalance in >> 'ext4_mb_good_group_nolock' - different lock contexts for basic block # https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?id=bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 git remote add ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git git remote update ext4 git checkout bf53b03e9d2ac23fb4a3e639fe023f5f1af607b0 vim +/ext4_mb_good_group_nolock +2209 fs/ext4/mballoc.c 9e467ce0e92226 Ritesh Harjani 2020-05-20 2169 9e467ce0e92226 Ritesh Harjani 2020-05-20 2170 /* 9e467ce0e92226 Ritesh Harjani 2020-05-20 2171 * This could return negative error code if something goes wrong 9e467ce0e92226 Ritesh Harjani 2020-05-20 2172 * during ext4_mb_init_group(). This should not be called with 9e467ce0e92226 Ritesh Harjani 2020-05-20 2173 * ext4_lock_group() held. 9e467ce0e92226 Ritesh Harjani 2020-05-20 2174 */ 9e467ce0e92226 Ritesh Harjani 2020-05-20 2175 static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac, 9e467ce0e92226 Ritesh Harjani 2020-05-20 2176 ext4_group_t group, int cr) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2177 { 9e467ce0e92226 Ritesh Harjani 2020-05-20 2178 struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2179 struct super_block *sb = ac->ac_sb; bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2180 bool should_lock = ac->ac_flags & EXT4_MB_STRICT_CHECK; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2181 ext4_grpblk_t free; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2182 int ret = 0; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2183 bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2184 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2185 ext4_lock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2186 free = grp->bb_free; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2187 if (free == 0) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2188 goto out; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2189 if (cr <= 2 && free < ac->ac_g_ex.fe_len) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2190 goto out; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2191 if (unlikely(EXT4_MB_GRP_BBITMAP_CORRUPT(grp))) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2192 goto out; bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2193 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2194 ext4_unlock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2195 9e467ce0e92226 Ritesh Harjani 2020-05-20 2196 /* We only do this if the grp has never been initialized */ 9e467ce0e92226 Ritesh Harjani 2020-05-20 2197 if (unlikely(EXT4_MB_GRP_NEED_INIT(grp))) { 9e467ce0e92226 Ritesh Harjani 2020-05-20 2198 ret = ext4_mb_init_group(ac->ac_sb, group, GFP_NOFS); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2199 if (ret) 9e467ce0e92226 Ritesh Harjani 2020-05-20 2200 return ret; 9e467ce0e92226 Ritesh Harjani 2020-05-20 2201 } 9e467ce0e92226 Ritesh Harjani 2020-05-20 2202 bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2203 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2204 ext4_lock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2205 ret = ext4_mb_good_group(ac, group, cr); 9e467ce0e92226 Ritesh Harjani 2020-05-20 2206 out: bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2207 if (should_lock) bf53b03e9d2ac2 Ritesh Harjani 2020-05-20 2208 ext4_unlock_group(sb, group); 9e467ce0e92226 Ritesh Harjani 2020-05-20 @2209 return ret; c9de560ded61fa Alex Tomas 2008-01-29 2210 } c9de560ded61fa Alex Tomas 2008-01-29 2211 :::::: The code at line 2209 was first introduced by commit :::::: 9e467ce0e92226a8c859d7850e6a6065f6eff8fd ext4: mballoc: refactor ext4_mb_good_group() :::::: TO: Ritesh Harjani <rite...@linux.ibm.com> :::::: CC: Theodore Ts'o <ty...@mit.edu> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org