From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: mm/vmalloc.c:2782:58: warning: operation on 'data->idx' may be undefined
Date: Sat, 06 Nov 2021 00:55:10 +0800 [thread overview]
Message-ID: <202111060001.P8jsFZb7-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3822 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d4439a1189f93d0ac1eaf0197db8e6b3e197d5c7
commit: 9a8797722e4239242d0cb4cc4baa805df6ac979e Drivers: hv: vmbus: Initialize VMbus ring buffer for Isolation VM
date: 8 days ago
config: arm64-randconfig-r022-20211105 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9a8797722e4239242d0cb4cc4baa805df6ac979e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9a8797722e4239242d0cb4cc4baa805df6ac979e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/kasan.h:10,
from arch/arm64/include/asm/processor.h:39,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:9,
from include/linux/spinlock.h:94,
from include/linux/vmalloc.h:5,
from mm/vmalloc.c:11:
mm/vmalloc.c: In function 'vmap_pfn_apply':
>> mm/vmalloc.c:2782:58: warning: operation on 'data->idx' may be undefined [-Wsequence-point]
2782 | *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
| ~~~~~~~~~^~
arch/arm64/include/asm/pgtable-types.h:25:37: note: in definition of macro '__pte'
25 | #define __pte(x) ((pte_t) { (x) } )
| ^
arch/arm64/include/asm/pgtable.h:80:15: note: in expansion of macro '__phys_to_pte_val'
80 | __pte(__phys_to_pte_val((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
| ^~~~~~~~~~~~~~~~~
mm/vmalloc.c:2782:30: note: in expansion of macro 'pfn_pte'
2782 | *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
| ^~~~~~~
vim +2782 mm/vmalloc.c
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2775
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2776 static int vmap_pfn_apply(pte_t *pte, unsigned long addr, void *private)
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2777 {
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2778 struct vmap_pfn_data *data = private;
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2779
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2780 if (WARN_ON_ONCE(pfn_valid(data->pfns[data->idx])))
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2781 return -EINVAL;
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 @2782 *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2783 return 0;
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2784 }
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2785
:::::: The code at line 2782 was first introduced by commit
:::::: 3e9a9e256b1e1e6e8f19faf76fa9c37578ae35ee mm: add a vmap_pfn function
:::::: TO: Christoph Hellwig <hch@lst.de>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42053 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Tianyu Lan <Tianyu.Lan@microsoft.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Wei Liu <wei.liu@kernel.org>,
Michael Kelley <mikelley@microsoft.com>
Subject: mm/vmalloc.c:2782:58: warning: operation on 'data->idx' may be undefined
Date: Sat, 6 Nov 2021 00:55:10 +0800 [thread overview]
Message-ID: <202111060001.P8jsFZb7-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3753 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d4439a1189f93d0ac1eaf0197db8e6b3e197d5c7
commit: 9a8797722e4239242d0cb4cc4baa805df6ac979e Drivers: hv: vmbus: Initialize VMbus ring buffer for Isolation VM
date: 8 days ago
config: arm64-randconfig-r022-20211105 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9a8797722e4239242d0cb4cc4baa805df6ac979e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9a8797722e4239242d0cb4cc4baa805df6ac979e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/kasan.h:10,
from arch/arm64/include/asm/processor.h:39,
from include/asm-generic/qrwlock.h:14,
from ./arch/arm64/include/generated/asm/qrwlock.h:1,
from arch/arm64/include/asm/spinlock.h:9,
from include/linux/spinlock.h:94,
from include/linux/vmalloc.h:5,
from mm/vmalloc.c:11:
mm/vmalloc.c: In function 'vmap_pfn_apply':
>> mm/vmalloc.c:2782:58: warning: operation on 'data->idx' may be undefined [-Wsequence-point]
2782 | *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
| ~~~~~~~~~^~
arch/arm64/include/asm/pgtable-types.h:25:37: note: in definition of macro '__pte'
25 | #define __pte(x) ((pte_t) { (x) } )
| ^
arch/arm64/include/asm/pgtable.h:80:15: note: in expansion of macro '__phys_to_pte_val'
80 | __pte(__phys_to_pte_val((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
| ^~~~~~~~~~~~~~~~~
mm/vmalloc.c:2782:30: note: in expansion of macro 'pfn_pte'
2782 | *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
| ^~~~~~~
vim +2782 mm/vmalloc.c
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2775
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2776 static int vmap_pfn_apply(pte_t *pte, unsigned long addr, void *private)
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2777 {
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2778 struct vmap_pfn_data *data = private;
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2779
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2780 if (WARN_ON_ONCE(pfn_valid(data->pfns[data->idx])))
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2781 return -EINVAL;
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 @2782 *pte = pte_mkspecial(pfn_pte(data->pfns[data->idx++], data->prot));
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2783 return 0;
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2784 }
3e9a9e256b1e1e Christoph Hellwig 2020-10-17 2785
:::::: The code at line 2782 was first introduced by commit
:::::: 3e9a9e256b1e1e6e8f19faf76fa9c37578ae35ee mm: add a vmap_pfn function
:::::: TO: Christoph Hellwig <hch@lst.de>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42053 bytes --]
next reply other threads:[~2021-11-05 16:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 16:55 kernel test robot [this message]
2021-11-05 16:55 ` mm/vmalloc.c:2782:58: warning: operation on 'data->idx' may be undefined kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202111060001.P8jsFZb7-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.