[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201509281128.r1CboaDC%fengguang.wu@intel.com>
Date: Mon, 28 Sep 2015 11:53:42 +0800
From: kbuild test robot <lkp@...el.com>
To: Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>
Cc: kbuild-all@...org, Jonathan Corbet <corbet@....net>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vivek Goyal <vgoyal@...hat.com>, linux-doc@...r.kernel.org,
x86@...nel.org, kexec@...ts.infradead.org,
linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...nel.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: Re: [V4 PATCH 3/4] kexec: Fix race between panic() and crash_kexec()
called directly
Hi Hidehiro,
[auto build test results on v4.3-rc2 -- if it's inappropriate base, please ignore]
config: ia64-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 0077681103150af584e5e592c0238fd010654c26
# save the attached .config to linux build tree
make.cross ARCH=ia64
All warnings (new ones prefixed by >>):
In file included from arch/ia64/include/uapi/asm/intrinsics.h:21:0,
from arch/ia64/include/asm/intrinsics.h:10,
from arch/ia64/include/asm/bitops.h:18,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from kernel/kexec_core.c:12:
kernel/kexec_core.c: In function 'crash_kexec':
arch/ia64/include/uapi/asm/cmpxchg.h:56:2: warning: value computed is not used [-Wunused-value]
((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr))))
^
arch/ia64/include/asm/atomic.h:135:30: note: in expansion of macro 'xchg'
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
^
>> kernel/kexec_core.c:899:3: note: in expansion of macro 'atomic_xchg'
atomic_xchg(&panic_cpu, -1);
^
vim +/atomic_xchg +899 kernel/kexec_core.c
883
884 /*
885 * Only one CPU is allowed to execute the crash_kexec() code as with
886 * panic(). Otherwise parallel calls of panic() and crash_kexec()
887 * may stop each other. To exclude them, we use panic_cpu here too.
888 */
889 this_cpu = raw_smp_processor_id();
890 old_cpu = atomic_cmpxchg(&panic_cpu, -1, this_cpu);
891 if (old_cpu == -1) {
892 /* This is the 1st CPU which comes here, so go ahead. */
893 __crash_kexec(regs);
894
895 /*
896 * Reset panic_cpu to allow another panic()/crash_kexec()
897 * call.
898 */
> 899 atomic_xchg(&panic_cpu, -1);
900 }
901 }
902
903 size_t crash_get_memory_size(void)
904 {
905 size_t size = 0;
906
907 mutex_lock(&kexec_mutex);
---
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/octet-stream" (43669 bytes)
Powered by blists - more mailing lists