lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2410061710220.12182@hadrien>
Date: Sun, 6 Oct 2024 17:10:57 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Ritesh Harjani <riteshh@...ux.ibm.com>
cc: Theodore Ts'o <tytso@....edu>, linux-kernel@...r.kernel.org, 
    oe-kbuild-all@...ts.linux.dev
Subject: fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret)
 (fwd)



---------- Forwarded message ----------
Date: Sun, 6 Oct 2024 22:59:43 +0800
From: kernel test robot <lkp@...el.com>
To: oe-kbuild@...ts.linux.dev
Cc: lkp@...el.com, Julia Lawall <julia.lawall@...ia.fr>
Subject: fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret)

BCC: lkp@...el.com
CC: oe-kbuild-all@...ts.linux.dev
CC: linux-kernel@...r.kernel.org
TO: Ritesh Harjani <riteshh@...ux.ibm.com>
CC: "Theodore Ts'o" <tytso@....edu>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8f602276d3902642fdc3429b548d73c745446601
commit: 07b5b8e1ac4004b7db1065a301df65cd434c31c9 ext4: mballoc: introduce pcpu seqcnt for freeing PA to improve ENOSPC handling
date:   4 years, 4 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 4 years, 4 months ago
config: x86_64-randconfig-102-20241006 (https://download.01.org/0day-ci/archive/20241006/202410062256.BoynX3c2-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Julia Lawall <julia.lawall@...ia.fr>
| Closes: https://lore.kernel.org/r/202410062256.BoynX3c2-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret)

vim +4597 fs/ext4/mballoc.c

c9de560ded61fa Alex Tomas     2008-01-29  4577
cf5e2ca6c99077 Ritesh Harjani 2020-05-20  4578  static bool ext4_mb_discard_preallocations_should_retry(struct super_block *sb,
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4579  			struct ext4_allocation_context *ac, u64 *seq)
cf5e2ca6c99077 Ritesh Harjani 2020-05-20  4580  {
cf5e2ca6c99077 Ritesh Harjani 2020-05-20  4581  	int freed;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4582  	u64 seq_retry = 0;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4583  	bool ret = false;
cf5e2ca6c99077 Ritesh Harjani 2020-05-20  4584
cf5e2ca6c99077 Ritesh Harjani 2020-05-20  4585  	freed = ext4_mb_discard_preallocations(sb, ac->ac_o_ex.fe_len);
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4586  	if (freed) {
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4587  		ret = true;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4588  		goto out_dbg;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4589  	}
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4590  	seq_retry = ext4_get_discard_pa_seq_sum();
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4591  	if (seq_retry != *seq) {
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4592  		*seq = seq_retry;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4593  		ret = true;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4594  	}
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4595
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4596  out_dbg:
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 @4597  	mb_debug(sb, "freed %d, retry ? %s\n", freed, ret ? "yes" : "no");
07b5b8e1ac4004 Ritesh Harjani 2020-05-20  4598  	return ret;
cf5e2ca6c99077 Ritesh Harjani 2020-05-20  4599  }
cf5e2ca6c99077 Ritesh Harjani 2020-05-20  4600

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ