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: <202409111620.WGpinYej-lkp@intel.com>
Date: Wed, 11 Sep 2024 16:59:44 +0800
From: kernel test robot <lkp@...el.com>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: fs/bcachefs/super.c:1096:59-60: Unneeded semicolon

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8d8d276ba2fb5f9ac4984f5c10ae60858090babc
commit: 0d529663f04be744d6af879889c5b16e46286ce1 bcachefs: Split brain detection
date:   8 months ago
config: loongarch-randconfig-r063-20240911 (https://download.01.org/0day-ci/archive/20240911/202409111620.WGpinYej-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.1.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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409111620.WGpinYej-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/bcachefs/super.c:1096:59-60: Unneeded semicolon
   fs/bcachefs/super.c:1100:59-60: Unneeded semicolon

vim +1096 fs/bcachefs/super.c

  1065	
  1066	static int bch2_dev_in_fs(struct bch_sb_handle *fs,
  1067				  struct bch_sb_handle *sb)
  1068	{
  1069		if (fs == sb)
  1070			return 0;
  1071	
  1072		if (!uuid_equal(&fs->sb->uuid, &sb->sb->uuid))
  1073			return -BCH_ERR_device_not_a_member_of_filesystem;
  1074	
  1075		if (!bch2_dev_exists(fs->sb, sb->sb->dev_idx))
  1076			return -BCH_ERR_device_has_been_removed;
  1077	
  1078		if (fs->sb->block_size != sb->sb->block_size)
  1079			return -BCH_ERR_mismatched_block_size;
  1080	
  1081		if (le16_to_cpu(fs->sb->version) < bcachefs_metadata_version_member_seq ||
  1082		    le16_to_cpu(sb->sb->version) < bcachefs_metadata_version_member_seq)
  1083			return 0;
  1084	
  1085		if (fs->sb->seq == sb->sb->seq &&
  1086		    fs->sb->write_time != sb->sb->write_time) {
  1087			struct printbuf buf = PRINTBUF;
  1088	
  1089			prt_printf(&buf, "Split brain detected between %pg and %pg:",
  1090				   sb->bdev, fs->bdev);
  1091			prt_newline(&buf);
  1092			prt_printf(&buf, "seq=%llu but write_time different, got", le64_to_cpu(sb->sb->seq));
  1093			prt_newline(&buf);
  1094	
  1095			prt_printf(&buf, "%pg ", fs->bdev);
> 1096			bch2_prt_datetime(&buf, le64_to_cpu(fs->sb->write_time));;
  1097			prt_newline(&buf);
  1098	
  1099			prt_printf(&buf, "%pg ", sb->bdev);
  1100			bch2_prt_datetime(&buf, le64_to_cpu(sb->sb->write_time));;
  1101			prt_newline(&buf);
  1102	
  1103			prt_printf(&buf, "Not using older sb");
  1104	
  1105			pr_err("%s", buf.buf);
  1106			printbuf_exit(&buf);
  1107			return -BCH_ERR_device_splitbrain;
  1108		}
  1109	
  1110		struct bch_member m = bch2_sb_member_get(fs->sb, sb->sb->dev_idx);
  1111		u64 seq_from_fs		= le64_to_cpu(m.seq);
  1112		u64 seq_from_member	= le64_to_cpu(sb->sb->seq);
  1113	
  1114		if (seq_from_fs && seq_from_fs < seq_from_member) {
  1115			pr_err("Split brain detected between %pg and %pg:\n"
  1116			       "%pg believes seq of %pg to be %llu, but %pg has %llu\n"
  1117			       "Not using %pg",
  1118			       sb->bdev, fs->bdev,
  1119			       fs->bdev, sb->bdev, seq_from_fs,
  1120			       sb->bdev, seq_from_member,
  1121			       sb->bdev);
  1122			return -BCH_ERR_device_splitbrain;
  1123		}
  1124	
  1125		return 0;
  1126	}
  1127	

-- 
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