[gvt-linux:gvt-staging 1188/1286] mm/huge_memory.c:2506:41: error: request for member 'i_pages' in something not a structure or union

kbuild test robot lkp at intel.com
Sat Jun 22 19:42:48 UTC 2019


tree:   https://github.com/intel/gvt-linux.git gvt-staging
head:   ce22ba8d4f2c09902d71d83c040b7b5d097b1a78
commit: bafa159ec71c0f4091807992727aa48434eb095c [1188/1286] mm: Band aid for 5fd4ca2d84b249f0858ce28cf637cf25b61a398f
config: x86_64-randconfig-u0-06230010 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
        git checkout bafa159ec71c0f4091807992727aa48434eb095c
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   mm/huge_memory.c: In function '__split_huge_page':
   mm/huge_memory.c:2506:41: warning: dereferencing 'void *' pointer
       __xa_store(&swap_address_space(entry)->i_pages,
                                            ^
>> mm/huge_memory.c:2506:41: error: request for member 'i_pages' in something not a structure or union

vim +/i_pages +2506 mm/huge_memory.c

  2478	
  2479	static void __split_huge_page(struct page *page, struct list_head *list,
  2480			pgoff_t end, unsigned long flags)
  2481	{
  2482		struct page *head = compound_head(page);
  2483		pg_data_t *pgdat = page_pgdat(head);
  2484		struct lruvec *lruvec;
  2485		int i;
  2486	
  2487		lruvec = mem_cgroup_page_lruvec(head, pgdat);
  2488	
  2489		/* complete memcg works before add pages to LRU */
  2490		mem_cgroup_split_huge_fixup(head);
  2491	
  2492		for (i = HPAGE_PMD_NR - 1; i >= 1; i--) {
  2493			__split_huge_page_tail(head, i, lruvec, list);
  2494			/* Some pages can be beyond i_size: drop them from page cache */
  2495			if (head[i].index >= end) {
  2496				ClearPageDirty(head + i);
  2497				__delete_from_page_cache(head + i, NULL);
  2498				if (IS_ENABLED(CONFIG_SHMEM) && PageSwapBacked(head))
  2499					shmem_uncharge(head->mapping->host, 1);
  2500				put_page(head + i);
  2501			} else if (!PageAnon(page)) {
  2502				__xa_store(&head->mapping->i_pages, head[i].index,
  2503						head + i, 0);
  2504			} else if (PageSwapCache(page)) {
  2505				swp_entry_t entry = { .val = page_private(head + i) };
> 2506				__xa_store(&swap_address_space(entry)->i_pages,
  2507					   swp_offset(entry),
  2508					   head + i, 0);
  2509			}
  2510		}
  2511	
  2512		ClearPageCompound(head);
  2513		/* See comment in __split_huge_page_tail() */
  2514		if (PageAnon(head)) {
  2515			/* Additional pin to swap cache */
  2516			if (PageSwapCache(head))
  2517				page_ref_add(head, 2);
  2518			else
  2519				page_ref_inc(head);
  2520		} else {
  2521			/* Additional pin to page cache */
  2522			page_ref_add(head, 2);
  2523			xa_unlock(&head->mapping->i_pages);
  2524		}
  2525	
  2526		spin_unlock_irqrestore(&pgdat->lru_lock, flags);
  2527	
  2528		remap_page(head);
  2529	
  2530		for (i = 0; i < HPAGE_PMD_NR; i++) {
  2531			struct page *subpage = head + i;
  2532			if (subpage == page)
  2533				continue;
  2534			unlock_page(subpage);
  2535	
  2536			/*
  2537			 * Subpages may be freed if there wasn't any mapping
  2538			 * like if add_to_swap() is running on a lru page that
  2539			 * had its mapping zapped. And freeing these pages
  2540			 * requires taking the lru_lock so we do the put_page
  2541			 * of the tail pages after the split is complete.
  2542			 */
  2543			put_page(subpage);
  2544		}
  2545	}
  2546	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 34208 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20190623/69d505ca/attachment-0001.gz>


More information about the intel-gvt-dev mailing list