CC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Thomas Gleixner <[email protected]>
CC: Sebastian Andrzej Siewior <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git 
linux-5.14.y-rt-rebase
head:   f97c8b4712a17c17b0f7a6853126308ea9064a3c
commit: a6b56cfe6ddf3b8b679d5fb0e97b0c13b2493438 [172/233] mm/vmalloc: Another 
preempt disable region which sucks
:::::: branch date: 32 hours ago
:::::: commit date: 32 hours ago
config: x86_64-randconfig-c001-20210803 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=a6b56cfe6ddf3b8b679d5fb0e97b0c13b2493438
        git remote add linux-rt-devel 
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
        git fetch --no-tags linux-rt-devel linux-5.14.y-rt-rebase
        git checkout a6b56cfe6ddf3b8b679d5fb0e97b0c13b2493438
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


clang-analyzer warnings: (new ones prefixed by >>)
           ^
   include/linux/compiler_types.h:306:2: note: expanded from macro 
'__compiletime_assert'
           do {                                                            \
           ^
   fs/nilfs2/recovery.c:410:3: note: Calling 'list_del'
                   list_del(&ent->list);
                   ^~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:146:2: note: Calling '__list_del_entry'
           __list_del_entry(entry);
           ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:132:2: note: Taking false branch
           if (!__list_del_entry_valid(entry))
           ^
   include/linux/list.h:135:13: note: Use of memory after it is freed
           __list_del(entry->prev, entry->next);
                      ^~~~~~~~~~~
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (2 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   11 warnings generated.
   drivers/regulator/core.c:1109:2: warning: Value stored to 'count' is never 
read [clang-analyzer-deadcode.DeadStores]
           count += scnprintf(buf + count, len - count, ", %s",
           ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/regulator/core.c:1109:2: note: Value stored to 'count' is never read
           count += scnprintf(buf + count, len - count, ", %s",
           ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/regulator/core.c:3791:3: warning: Value stored to 'possible_uV' is 
never read [clang-analyzer-deadcode.DeadStores]
                   possible_uV = desired_min_uV;
                   ^             ~~~~~~~~~~~~~~
   drivers/regulator/core.c:3791:3: note: Value stored to 'possible_uV' is 
never read
                   possible_uV = desired_min_uV;
                   ^             ~~~~~~~~~~~~~~
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   10 warnings generated.
   mm/vmalloc.c:285:2: warning: Value stored to 'start' is never read 
[clang-analyzer-deadcode.DeadStores]
           start = addr;
           ^       ~~~~
   mm/vmalloc.c:285:2: note: Value stored to 'start' is never read
           start = addr;
           ^       ~~~~
   mm/vmalloc.c:568:18: warning: Value stored to 'nr' during its initialization 
is never read [clang-analyzer-deadcode.DeadStores]
           unsigned int i, nr = (end - addr) >> PAGE_SHIFT;
                           ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/vmalloc.c:568:18: note: Value stored to 'nr' during its initialization is 
never read
           unsigned int i, nr = (end - addr) >> PAGE_SHIFT;
                           ^~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmalloc.c:1887:2: warning: Value stored to 'cpu' is never read 
>> [clang-analyzer-deadcode.DeadStores]
           cpu = get_cpu_light();
           ^
   mm/vmalloc.c:1887:2: note: Value stored to 'cpu' is never read
   mm/vmalloc.c:1972:2: warning: Value stored to 'cpu' is never read 
[clang-analyzer-deadcode.DeadStores]
           cpu = get_cpu_light();
           ^
   mm/vmalloc.c:1972:2: note: Value stored to 'cpu' is never read
   Suppressed 6 warnings (3 in non-user code, 3 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   10 warnings generated.
   mm/page_alloc.c:1532:2: warning: Assigned value is garbage or undefined 
[clang-analyzer-core.uninitialized.Assign]
           list_for_each_entry_safe(page, tmp, &head, lru) {
           ^
   include/linux/list.h:716:7: note: expanded from macro 
'list_for_each_entry_safe'
                   n = list_next_entry(pos, member);                       \
                       ^
   include/linux/list.h:555:2: note: expanded from macro 'list_next_entry'
           list_entry((pos)->member.next, typeof(*(pos)), member)
           ^
   include/linux/list.h:511:2: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ^
   include/linux/kernel.h:494:2: note: expanded from macro 'container_of'
           void *__mptr = (void *)(ptr);                                   \
           ^
   mm/page_alloc.c:8207:2: note: Calling 'drain_pages'
           drain_pages(cpu);
           ^~~~~~~~~~~~~~~~
   mm/page_alloc.c:3133:2: note: Loop condition is true.  Entering loop body
           for_each_populated_zone(zone) {
           ^
   include/linux/mmzone.h:1104:2: note: expanded from macro 
'for_each_populated_zone'
           for (zone = (first_online_pgdat())->node_zones; \
           ^
   mm/page_alloc.c:3133:2: note: Assuming the condition is false
           for_each_populated_zone(zone) {
           ^
   include/linux/mmzone.h:1107:7: note: expanded from macro 
'for_each_populated_zone'
                   if (!populated_zone(zone))              \
                       ^~~~~~~~~~~~~~~~~~~~~
   mm/page_alloc.c:3133:2: note: Taking false branch
           for_each_populated_zone(zone) {
           ^
   include/linux/mmzone.h:1107:3: note: expanded from macro 
'for_each_populated_zone'
                   if (!populated_zone(zone))              \
                   ^
   mm/page_alloc.c:3134:3: note: Calling 'drain_pages_zone'
                   drain_pages_zone(cpu, zone);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/page_alloc.c:3113:2: note: Loop condition is false.  Exiting loop
           local_lock_irqsave(&pagesets.lock, flags);
           ^
   include/linux/local_lock.h:31:2: note: expanded from macro 
'local_lock_irqsave'
           __local_lock_irqsave(lock, flags)
           ^
   include/linux/local_lock_internal.h:135:3: note: expanded from macro 
'__local_lock_irqsave'
                   ll_local_irq_save(flags);                       \
                   ^
   include/linux/local_lock_internal.h:65:34: note: expanded from macro 
'll_local_irq_save'
   #define ll_local_irq_save(flags)        local_irq_save(flags)
                                           ^
   include/linux/irqflags.h:221:3: note: expanded from macro 'local_irq_save'
                   raw_local_irq_save(flags);              \
                   ^
   include/linux/irqflags.h:176:2: note: expanded from macro 
'raw_local_irq_save'
           do {                                            \
           ^
   mm/page_alloc.c:3113:2: note: Taking false branch
           local_lock_irqsave(&pagesets.lock, flags);
           ^
   include/linux/local_lock.h:31:2: note: expanded from macro 
'local_lock_irqsave'
           __local_lock_irqsave(lock, flags)
           ^
   include/linux/local_lock_internal.h:135:3: note: expanded from macro 
'__local_lock_irqsave'
                   ll_local_irq_save(flags);                       \
                   ^
   include/linux/local_lock_internal.h:65:34: note: expanded from macro 
'll_local_irq_save'
   #define ll_local_irq_save(flags)        local_irq_save(flags)
                                           ^
   include/linux/irqflags.h:222:3: note: expanded from macro 'local_irq_save'
                   if (!raw_irqs_disabled_flags(flags))    \
                   ^
   mm/page_alloc.c:3113:2: note: Loop condition is false.  Exiting loop
           local_lock_irqsave(&pagesets.lock, flags);
           ^
   include/linux/local_lock.h:31:2: note: expanded from macro 
'local_lock_irqsave'
           __local_lock_irqsave(lock, flags)
           ^
   include/linux/local_lock_internal.h:135:3: note: expanded from macro 
'__local_lock_irqsave'
                   ll_local_irq_save(flags);                       \
                   ^
   include/linux/local_lock_internal.h:65:34: note: expanded from macro 
'll_local_irq_save'
   #define ll_local_irq_save(flags)        local_irq_save(flags)
                                           ^

vim +/cpu +1887 mm/vmalloc.c

cf725ce274ba02 Roman Pen               2015-04-15  1835  
cf725ce274ba02 Roman Pen               2015-04-15  1836  /**
cf725ce274ba02 Roman Pen               2015-04-15  1837   * new_vmap_block - 
allocates new vmap_block and occupies 2^order pages in this
cf725ce274ba02 Roman Pen               2015-04-15  1838   *                  
block. Of course pages number can't exceed VMAP_BBMAP_BITS
cf725ce274ba02 Roman Pen               2015-04-15  1839   * @order:    how many 
2^order pages should be occupied in newly allocated block
cf725ce274ba02 Roman Pen               2015-04-15  1840   * @gfp_mask: flags 
for the page level allocator
cf725ce274ba02 Roman Pen               2015-04-15  1841   *
a862f68a8b3600 Mike Rapoport           2019-03-05  1842   * Return: virtual 
address in a newly allocated block or ERR_PTR(-errno)
cf725ce274ba02 Roman Pen               2015-04-15  1843   */
cf725ce274ba02 Roman Pen               2015-04-15  1844  static void 
*new_vmap_block(unsigned int order, gfp_t gfp_mask)
db64fe02258f15 Nicholas Piggin         2008-10-18  1845  {
db64fe02258f15 Nicholas Piggin         2008-10-18  1846         struct 
vmap_block_queue *vbq;
db64fe02258f15 Nicholas Piggin         2008-10-18  1847         struct 
vmap_block *vb;
db64fe02258f15 Nicholas Piggin         2008-10-18  1848         struct 
vmap_area *va;
db64fe02258f15 Nicholas Piggin         2008-10-18  1849         unsigned long 
vb_idx;
a6b56cfe6ddf3b Thomas Gleixner         2011-07-12  1850         int node, err, 
cpu;
cf725ce274ba02 Roman Pen               2015-04-15  1851         void *vaddr;
db64fe02258f15 Nicholas Piggin         2008-10-18  1852  
db64fe02258f15 Nicholas Piggin         2008-10-18  1853         node = 
numa_node_id();
db64fe02258f15 Nicholas Piggin         2008-10-18  1854  
db64fe02258f15 Nicholas Piggin         2008-10-18  1855         vb = 
kmalloc_node(sizeof(struct vmap_block),
db64fe02258f15 Nicholas Piggin         2008-10-18  1856                         
gfp_mask & GFP_RECLAIM_MASK, node);
db64fe02258f15 Nicholas Piggin         2008-10-18  1857         if 
(unlikely(!vb))
db64fe02258f15 Nicholas Piggin         2008-10-18  1858                 return 
ERR_PTR(-ENOMEM);
db64fe02258f15 Nicholas Piggin         2008-10-18  1859  
db64fe02258f15 Nicholas Piggin         2008-10-18  1860         va = 
alloc_vmap_area(VMAP_BLOCK_SIZE, VMAP_BLOCK_SIZE,
db64fe02258f15 Nicholas Piggin         2008-10-18  1861                         
                VMALLOC_START, VMALLOC_END,
db64fe02258f15 Nicholas Piggin         2008-10-18  1862                         
                node, gfp_mask);
ddf9c6d472825c Tobias Klauser          2011-01-13  1863         if (IS_ERR(va)) 
{
db64fe02258f15 Nicholas Piggin         2008-10-18  1864                 
kfree(vb);
e7d86340793e71 Julia Lawall            2010-08-09  1865                 return 
ERR_CAST(va);
db64fe02258f15 Nicholas Piggin         2008-10-18  1866         }
db64fe02258f15 Nicholas Piggin         2008-10-18  1867  
cf725ce274ba02 Roman Pen               2015-04-15  1868         vaddr = 
vmap_block_vaddr(va->va_start, 0);
db64fe02258f15 Nicholas Piggin         2008-10-18  1869         
spin_lock_init(&vb->lock);
db64fe02258f15 Nicholas Piggin         2008-10-18  1870         vb->va = va;
cf725ce274ba02 Roman Pen               2015-04-15  1871         /* At least 
something should be left free */
cf725ce274ba02 Roman Pen               2015-04-15  1872         
BUG_ON(VMAP_BBMAP_BITS <= (1UL << order));
cf725ce274ba02 Roman Pen               2015-04-15  1873         vb->free = 
VMAP_BBMAP_BITS - (1UL << order);
db64fe02258f15 Nicholas Piggin         2008-10-18  1874         vb->dirty = 0;
7d61bfe8fddeca Roman Pen               2015-04-15  1875         vb->dirty_min = 
VMAP_BBMAP_BITS;
7d61bfe8fddeca Roman Pen               2015-04-15  1876         vb->dirty_max = 
0;
db64fe02258f15 Nicholas Piggin         2008-10-18  1877         
INIT_LIST_HEAD(&vb->free_list);
db64fe02258f15 Nicholas Piggin         2008-10-18  1878  
db64fe02258f15 Nicholas Piggin         2008-10-18  1879         vb_idx = 
addr_to_vb_idx(va->va_start);
0f14599c607d32 Matthew Wilcox (Oracle  2020-08-06  1880)        err = 
xa_insert(&vmap_blocks, vb_idx, vb, gfp_mask);
0f14599c607d32 Matthew Wilcox (Oracle  2020-08-06  1881)        if (err) {
0f14599c607d32 Matthew Wilcox (Oracle  2020-08-06  1882)                
kfree(vb);
0f14599c607d32 Matthew Wilcox (Oracle  2020-08-06  1883)                
free_vmap_area(va);
0f14599c607d32 Matthew Wilcox (Oracle  2020-08-06  1884)                return 
ERR_PTR(err);
0f14599c607d32 Matthew Wilcox (Oracle  2020-08-06  1885)        }
db64fe02258f15 Nicholas Piggin         2008-10-18  1886  
a6b56cfe6ddf3b Thomas Gleixner         2011-07-12 @1887         cpu = 
get_cpu_light();
a6b56cfe6ddf3b Thomas Gleixner         2011-07-12  1888         vbq = 
this_cpu_ptr(&vmap_block_queue);
db64fe02258f15 Nicholas Piggin         2008-10-18  1889         
spin_lock(&vbq->lock);
68ac546f265ba3 Roman Pen               2015-04-15  1890         
list_add_tail_rcu(&vb->free_list, &vbq->free);
db64fe02258f15 Nicholas Piggin         2008-10-18  1891         
spin_unlock(&vbq->lock);
a6b56cfe6ddf3b Thomas Gleixner         2011-07-12  1892         put_cpu_light();
db64fe02258f15 Nicholas Piggin         2008-10-18  1893  
cf725ce274ba02 Roman Pen               2015-04-15  1894         return vaddr;
db64fe02258f15 Nicholas Piggin         2008-10-18  1895  }
db64fe02258f15 Nicholas Piggin         2008-10-18  1896  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to