[bug report] hugetlb, mempolicy: fix the mbind hugetlb migration

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

 



Hello Michal Hocko,

This is a semi-automatic email about new static checker warnings.

The patch ef2fc869a863: "hugetlb, mempolicy: fix the mbind hugetlb 
migration" from Jan 5, 2018, leads to the following Smatch complaint:

    mm/mempolicy.c:1100 new_page()
    error: we previously assumed 'vma' could be null (see line 1092)

mm/mempolicy.c
  1091		vma = find_vma(current->mm, start);
  1092		while (vma) {
                       ^^^
There is a check for NULL here

  1093			address = page_address_in_vma(page, vma);
  1094			if (address != -EFAULT)
  1095				break;
  1096			vma = vma->vm_next;
  1097		}
  1098	
  1099		if (PageHuge(page)) {
  1100			return alloc_huge_page_vma(vma, address);
                                                   ^^^
The patch adds a new unchecked dereference.  It might be OK?  I don't
know.

  1101		} else if (PageTransHuge(page)) {
  1102			struct page *thp;

regards,
dan carpenter

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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