[mmotm:master 149/256] mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   1ceb98996d2504dd4e0bcb5f4cb9009a18cd8aaa
commit: c714f7da3636f838c8ed46c7c477525c2ea98a0f [149/256] mm, migrate: remove reason argument from new_page_t
config: i386-randconfig-i1-201800 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout c714f7da3636f838c8ed46c7c477525c2ea98a0f
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/memory-failure.c: In function 'soft_offline_huge_page':
>> mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
     ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
                                    ^~~~~~~~
   In file included from mm/memory-failure.c:51:0:
   include/linux/migrate.h:68:12: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
    extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
               ^~~~~~~~~~~~~
   mm/memory-failure.c: In function '__soft_offline_page':
   mm/memory-failure.c:1665:34: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
                                     ^~~~~~~~
   In file included from mm/memory-failure.c:51:0:
   include/linux/migrate.h:68:12: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
    extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
               ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/migrate_pages +1587 mm/memory-failure.c

af8fae7c0 Naoya Horiguchi   2013-02-22  1555  
d950b9588 Naoya Horiguchi   2010-09-08  1556  static int soft_offline_huge_page(struct page *page, int flags)
d950b9588 Naoya Horiguchi   2010-09-08  1557  {
d950b9588 Naoya Horiguchi   2010-09-08  1558  	int ret;
d950b9588 Naoya Horiguchi   2010-09-08  1559  	unsigned long pfn = page_to_pfn(page);
d950b9588 Naoya Horiguchi   2010-09-08  1560  	struct page *hpage = compound_head(page);
b8ec1cee5 Naoya Horiguchi   2013-09-11  1561  	LIST_HEAD(pagelist);
d950b9588 Naoya Horiguchi   2010-09-08  1562  
af8fae7c0 Naoya Horiguchi   2013-02-22  1563  	/*
af8fae7c0 Naoya Horiguchi   2013-02-22  1564  	 * This double-check of PageHWPoison is to avoid the race with
af8fae7c0 Naoya Horiguchi   2013-02-22  1565  	 * memory_failure(). See also comment in __soft_offline_page().
af8fae7c0 Naoya Horiguchi   2013-02-22  1566  	 */
af8fae7c0 Naoya Horiguchi   2013-02-22  1567  	lock_page(hpage);
0ebff32c3 Xishi Qiu         2013-02-22  1568  	if (PageHWPoison(hpage)) {
af8fae7c0 Naoya Horiguchi   2013-02-22  1569  		unlock_page(hpage);
665d9da7f Wanpeng Li        2015-09-08  1570  		put_hwpoison_page(hpage);
0ebff32c3 Xishi Qiu         2013-02-22  1571  		pr_info("soft offline: %#lx hugepage already poisoned\n", pfn);
af8fae7c0 Naoya Horiguchi   2013-02-22  1572  		return -EBUSY;
0ebff32c3 Xishi Qiu         2013-02-22  1573  	}
af8fae7c0 Naoya Horiguchi   2013-02-22  1574  	unlock_page(hpage);
d950b9588 Naoya Horiguchi   2010-09-08  1575  
bcc542223 Naoya Horiguchi   2015-04-15  1576  	ret = isolate_huge_page(hpage, &pagelist);
bcc542223 Naoya Horiguchi   2015-04-15  1577  	/*
bcc542223 Naoya Horiguchi   2015-04-15  1578  	 * get_any_page() and isolate_huge_page() takes a refcount each,
bcc542223 Naoya Horiguchi   2015-04-15  1579  	 * so need to drop one here.
bcc542223 Naoya Horiguchi   2015-04-15  1580  	 */
665d9da7f Wanpeng Li        2015-09-08  1581  	put_hwpoison_page(hpage);
036138080 Wanpeng Li        2015-08-14  1582  	if (!ret) {
bcc542223 Naoya Horiguchi   2015-04-15  1583  		pr_info("soft offline: %#lx hugepage failed to isolate\n", pfn);
bcc542223 Naoya Horiguchi   2015-04-15  1584  		return -EBUSY;
bcc542223 Naoya Horiguchi   2015-04-15  1585  	}
bcc542223 Naoya Horiguchi   2015-04-15  1586  
68711a746 David Rientjes    2014-06-04 @1587  	ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
b8ec1cee5 Naoya Horiguchi   2013-09-11  1588  				MIGRATE_SYNC, MR_MEMORY_FAILURE);
d950b9588 Naoya Horiguchi   2010-09-08  1589  	if (ret) {
b6b18aa87 Laszlo Toth       2017-11-15  1590  		pr_info("soft offline: %#lx: hugepage migration failed %d, type %lx (%pGp)\n",
82a2481e8 Anshuman Khandual 2017-05-03  1591  			pfn, ret, page->flags, &page->flags);
30809f559 Punit Agrawal     2017-06-02  1592  		if (!list_empty(&pagelist))
30809f559 Punit Agrawal     2017-06-02  1593  			putback_movable_pages(&pagelist);
b8ec1cee5 Naoya Horiguchi   2013-09-11  1594  		if (ret > 0)
b8ec1cee5 Naoya Horiguchi   2013-09-11  1595  			ret = -EIO;
af8fae7c0 Naoya Horiguchi   2013-02-22  1596  	} else {
b37ff71cc Naoya Horiguchi   2017-07-10  1597  		if (PageHuge(page))
c3114a84f Anshuman Khandual 2017-07-10  1598  			dissolve_free_huge_page(page);
a49ecbcd7 Jianguo Wu        2013-12-18  1599  	}
d950b9588 Naoya Horiguchi   2010-09-08  1600  	return ret;
d950b9588 Naoya Horiguchi   2010-09-08  1601  }
d950b9588 Naoya Horiguchi   2010-09-08  1602  

:::::: The code at line 1587 was first introduced by commit
:::::: 68711a746345c44ae00c64d8dbac6a9ce13ac54a mm, migration: add destination page freeing callback

:::::: TO: David Rientjes <rientjes@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux