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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202408311948.LQzaV2xP-lkp@intel.com>
Date: Sat, 31 Aug 2024 19:32:47 +0800
From: kernel test robot <lkp@...el.com>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [paulmck-rcu:dev.2024.08.30a 33/33] kernel/rcu/refscale.c:1179
 ref_scale_init() warn: inconsistent indenting

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2024.08.30a
head:   05416eb79213ad6a9770faa795059fdd00adb6e0
commit: 05416eb79213ad6a9770faa795059fdd00adb6e0 [33/33] refscale: Add srcu_read_lock_lite() support using "srcu-lite"
config: parisc-randconfig-r071-20240831 (https://download.01.org/0day-ci/archive/20240831/202408311948.LQzaV2xP-lkp@intel.com/config)
compiler: hppa-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/202408311948.LQzaV2xP-lkp@intel.com/

smatch warnings:
kernel/rcu/refscale.c:1179 ref_scale_init() warn: inconsistent indenting

vim +1179 kernel/rcu/refscale.c

  1159	
  1160	static int __init
  1161	ref_scale_init(void)
  1162	{
  1163		long i;
  1164		int firsterr = 0;
  1165		static const struct ref_scale_ops *scale_ops[] = {
  1166			&rcu_ops, &srcu_ops, &srcu_lite_ops, RCU_TRACE_OPS RCU_TASKS_OPS
  1167			&refcnt_ops, &rwlock_ops, &rwsem_ops, &lock_ops, &lock_irq_ops, &acqrel_ops,
  1168			&sched_clock_ops, &clock_ops, &jiffies_ops, &typesafe_ref_ops, &typesafe_lock_ops,
  1169			&typesafe_seqlock_ops,
  1170		};
  1171	
  1172		if (!torture_init_begin(scale_type, verbose))
  1173			return -EBUSY;
  1174	
  1175		for (i = 0; i < ARRAY_SIZE(scale_ops); i++) {
  1176			cur_ops = scale_ops[i]; if (strcmp(scale_type,
  1177			cur_ops->name) == 0)
  1178				break;
> 1179		} if (i == ARRAY_SIZE(scale_ops)) {
  1180			pr_alert("rcu-scale: invalid scale type: \"%s\"\n",
  1181			scale_type); pr_alert("rcu-scale types:"); for (i = 0;
  1182			i < ARRAY_SIZE(scale_ops); i++)
  1183				pr_cont(" %s", scale_ops[i]->name);
  1184			pr_cont("\n"); firsterr = -EINVAL; cur_ops = NULL;
  1185			goto unwind;
  1186		}
  1187		if (cur_ops->init)
  1188			if (!cur_ops->init()) {
  1189				firsterr = -EUCLEAN;
  1190				goto unwind;
  1191			}
  1192	
  1193		ref_scale_print_module_parms(cur_ops, "Start of test");
  1194	
  1195		// Shutdown task
  1196		if (shutdown) {
  1197			init_waitqueue_head(&shutdown_wq);
  1198			firsterr = torture_create_kthread(ref_scale_shutdown, NULL,
  1199							  shutdown_task);
  1200			if (torture_init_error(firsterr))
  1201				goto unwind;
  1202			schedule_timeout_uninterruptible(1);
  1203		}
  1204	
  1205		// Reader tasks (default to ~75% of online CPUs).
  1206		if (nreaders < 0)
  1207			nreaders = (num_online_cpus() >> 1) + (num_online_cpus() >> 2);
  1208		if (WARN_ONCE(loops <= 0, "%s: loops = %ld, adjusted to 1\n", __func__, loops))
  1209			loops = 1;
  1210		if (WARN_ONCE(nreaders <= 0, "%s: nreaders = %d, adjusted to 1\n", __func__, nreaders))
  1211			nreaders = 1;
  1212		if (WARN_ONCE(nruns <= 0, "%s: nruns = %d, adjusted to 1\n", __func__, nruns))
  1213			nruns = 1;
  1214		reader_tasks = kcalloc(nreaders, sizeof(reader_tasks[0]),
  1215				       GFP_KERNEL);
  1216		if (!reader_tasks) {
  1217			SCALEOUT_ERRSTRING("out of memory");
  1218			firsterr = -ENOMEM;
  1219			goto unwind;
  1220		}
  1221	
  1222		VERBOSE_SCALEOUT("Starting %d reader threads", nreaders);
  1223	
  1224		for (i = 0; i < nreaders; i++) {
  1225			init_waitqueue_head(&reader_tasks[i].wq);
  1226			firsterr = torture_create_kthread(ref_scale_reader, (void *)i,
  1227							  reader_tasks[i].task);
  1228			if (torture_init_error(firsterr))
  1229				goto unwind;
  1230		}
  1231	
  1232		// Main Task
  1233		init_waitqueue_head(&main_wq);
  1234		firsterr = torture_create_kthread(main_func, NULL, main_task);
  1235		if (torture_init_error(firsterr))
  1236			goto unwind;
  1237	
  1238		torture_init_end();
  1239		return 0;
  1240	
  1241	unwind:
  1242		torture_init_end();
  1243		ref_scale_cleanup();
  1244		if (shutdown) {
  1245			WARN_ON(!IS_MODULE(CONFIG_RCU_REF_SCALE_TEST));
  1246			kernel_power_off();
  1247		}
  1248		return firsterr;
  1249	}
  1250	

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