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: <201809120055.V25FVnYo%fengguang.wu@intel.com>
Date:   Wed, 12 Sep 2018 00:57:58 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        tipbuild@...or.com, Ingo Molnar <mingo@...nel.org>
Subject: [tip:locking/core 7/7] kernel/cpu.c:624:17: error:
 'cpu_hotplug_lock' undeclared

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head:   f1b2f6eccf99fc457221cc84c7550a8e3b17d4df
commit: f1b2f6eccf99fc457221cc84c7550a8e3b17d4df [7/7] locking/lockdep, cpu/hotplug: Annotate AP thread
config: i386-randconfig-s2-201836 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        git checkout f1b2f6eccf99fc457221cc84c7550a8e3b17d4df
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/spinlock_types.h:18:0,
                    from include/linux/spinlock.h:82,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/proc_fs.h:9,
                    from kernel/cpu.c:6:
   kernel/cpu.c: In function 'cpuhp_thread_fun':
>> kernel/cpu.c:624:17: error: 'cpu_hotplug_lock' undeclared (first use in this function)
     rwsem_acquire(&cpu_hotplug_lock.rw_sem.dep_map, 0, 0, _THIS_IP_);
                    ^
   include/linux/lockdep.h:555:61: note: in definition of macro 'lock_acquire_exclusive'
    #define lock_acquire_exclusive(l, s, t, n, i)  lock_acquire(l, s, t, 0, 1, n, i)
                                                                ^
   kernel/cpu.c:624:2: note: in expansion of macro 'rwsem_acquire'
     rwsem_acquire(&cpu_hotplug_lock.rw_sem.dep_map, 0, 0, _THIS_IP_);
     ^~~~~~~~~~~~~
   kernel/cpu.c:624:17: note: each undeclared identifier is reported only once for each function it appears in
     rwsem_acquire(&cpu_hotplug_lock.rw_sem.dep_map, 0, 0, _THIS_IP_);
                    ^
   include/linux/lockdep.h:555:61: note: in definition of macro 'lock_acquire_exclusive'
    #define lock_acquire_exclusive(l, s, t, n, i)  lock_acquire(l, s, t, 0, 1, n, i)
                                                                ^
   kernel/cpu.c:624:2: note: in expansion of macro 'rwsem_acquire'
     rwsem_acquire(&cpu_hotplug_lock.rw_sem.dep_map, 0, 0, _THIS_IP_);
     ^~~~~~~~~~~~~

vim +/cpu_hotplug_lock +624 kernel/cpu.c

   589	
   590	/*
   591	 * Execute teardown/startup callbacks on the plugged cpu. Also used to invoke
   592	 * callbacks when a state gets [un]installed at runtime.
   593	 *
   594	 * Each invocation of this function by the smpboot thread does a single AP
   595	 * state callback.
   596	 *
   597	 * It has 3 modes of operation:
   598	 *  - single: runs st->cb_state
   599	 *  - up:     runs ++st->state, while st->state < st->target
   600	 *  - down:   runs st->state--, while st->state > st->target
   601	 *
   602	 * When complete or on error, should_run is cleared and the completion is fired.
   603	 */
   604	static void cpuhp_thread_fun(unsigned int cpu)
   605	{
   606		struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
   607		bool bringup = st->bringup;
   608		enum cpuhp_state state;
   609	
   610		if (WARN_ON_ONCE(!st->should_run))
   611			return;
   612	
   613		/*
   614		 * ACQUIRE for the cpuhp_should_run() load of ->should_run. Ensures
   615		 * that if we see ->should_run we also see the rest of the state.
   616		 */
   617		smp_mb();
   618	
   619		/*
   620		 * The BP holds the hotplug lock, but we're now running on the AP,
   621		 * ensure that anybody asserting the lock is held, will actually find
   622		 * it so.
   623		 */
 > 624		rwsem_acquire(&cpu_hotplug_lock.rw_sem.dep_map, 0, 0, _THIS_IP_);
   625		cpuhp_lock_acquire(bringup);
   626	
   627		if (st->single) {
   628			state = st->cb_state;
   629			st->should_run = false;
   630		} else {
   631			if (bringup) {
   632				st->state++;
   633				state = st->state;
   634				st->should_run = (st->state < st->target);
   635				WARN_ON_ONCE(st->state > st->target);
   636			} else {
   637				state = st->state;
   638				st->state--;
   639				st->should_run = (st->state > st->target);
   640				WARN_ON_ONCE(st->state < st->target);
   641			}
   642		}
   643	
   644		WARN_ON_ONCE(!cpuhp_is_ap_state(state));
   645	
   646		if (cpuhp_is_atomic_state(state)) {
   647			local_irq_disable();
   648			st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
   649			local_irq_enable();
   650	
   651			/*
   652			 * STARTING/DYING must not fail!
   653			 */
   654			WARN_ON_ONCE(st->result);
   655		} else {
   656			st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
   657		}
   658	
   659		if (st->result) {
   660			/*
   661			 * If we fail on a rollback, we're up a creek without no
   662			 * paddle, no way forward, no way back. We loose, thanks for
   663			 * playing.
   664			 */
   665			WARN_ON_ONCE(st->rollback);
   666			st->should_run = false;
   667		}
   668	
   669		cpuhp_lock_release(bringup);
   670		rwsem_release(&cpu_hotplug_lock.rw_sem.dep_map, 1, _THIS_IP_);
   671	
   672		if (!st->should_run)
   673			complete_ap_thread(st, bringup);
   674	}
   675	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (23276 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ