On Thu, 21 May 2020 17:30:52 +0800 kbuild test robot <lkp(a)intel.com> wrote:
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb57b1fabcb28f358901b2df90abd2b48abc1ca8
commit: ef03574dee21524cbdbbf2af29fe06a62610570d [10668/10701] mm: introduce
include/linux/pgtable.h
config: parisc-randconfig-r011-20200521 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ef03574dee21524cbdbbf2af29fe06a62610570d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:95,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/parisc/kernel/asm-offsets.c:20:
include/linux/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not
used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro
'set_pte_at'
322 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
>> include/linux/pgtable.h:203:2: note: in expansion of macro 'pte_clear'
203 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/linux/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not
used [-Wunused-but-set-variable]
I can't reproduce this. And I can't see anything in -mm whcih would
have triggered this warning.
arch/parisc/include/asm/pgtable.h has
#define set_pte_at(mm, addr, ptep, pteval) \
do { \
pte_t old_pte; \
unsigned long flags; \
spin_lock_irqsave(pgd_spinlock((mm)->pgd), flags);\
old_pte = *ptep; \
set_pte(ptep, pteval); \
purge_tlb_entries(mm, addr); \
spin_unlock_irqrestore(pgd_spinlock((mm)->pgd), flags);\
} while (0)
and old_pte has been set-but-not-used for a long time.
Obviously we can fix it, but I'm worried that parisc's set_pte_at() was
previously unused and we've now done something to cause it to be used,
so we're now running previously untested code.