linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: n-horiguchi@ah.jp.nec.com
Cc: linux-mm@kvack.org
Subject: re: mm: mbind: add hugepage migration code to mbind()
Date: Mon, 19 Aug 2013 09:54:50 +0300	[thread overview]
Message-ID: <20130819065450.GC28591@elgon.mountain> (raw)

Hello Naoya Horiguchi,

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

The patch 4c5bbbd24ae1: "mm: mbind: add hugepage migration code to 
mbind()" from Aug 16, 2013, leads to the following Smatch complaint:

mm/mempolicy.c:1199 new_vma_page()
	 error: we previously assumed 'vma' could be null (see line 1191)

mm/mempolicy.c
  1190	
  1191		while (vma) {
                       ^^^
Old check.

  1192			address = page_address_in_vma(page, vma);
  1193			if (address != -EFAULT)
  1194				break;
  1195			vma = vma->vm_next;
  1196		}
  1197	
  1198		if (PageHuge(page))
  1199			return alloc_huge_page_noerr(vma, address, 1);
                                                     ^^^

New dereference inside the call to alloc_huge_page_noerr()

  1200		/*
  1201		 * if !vma, alloc_page_vma() will use task or system default policy

regards,
dan carpenter

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

             reply	other threads:[~2013-08-19  6:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19  6:54 Dan Carpenter [this message]
2013-08-19 18:28 ` [PATCH][mmotm] mbind: add BUG_ON(!vma) in new_vma_page() (was Re: mm: mbind: add hugepage migration code to mbind()) Naoya Horiguchi

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=20130819065450.GC28591@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox