linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: linux-mm@kvack.org
Subject: missing check in __get_user_pages
Date: Tue, 10 Jun 2014 10:54:39 -0400	[thread overview]
Message-ID: <20140610145439.GA17556@redhat.com> (raw)

coverity flagged this code in __get_user_pages

448                         if (is_vm_hugetlb_page(vma)) {
449                                 i = follow_hugetlb_page(mm, vma, pages, vmas,
450                                                 &start, &nr_pages, i,
451                                                 gup_flags);
452                                 continue;
453                         }

It seems unaware that follow_hugetlb_page can in some cases return -EFAULT.
I'm not sure if this is triggerable, but it looks dangerous.

	Dave

--
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:[~2014-06-10 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 14:54 Dave Jones [this message]
2014-06-10 15:34 ` missing check in __get_user_pages Kirill A. Shutemov

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=20140610145439.GA17556@redhat.com \
    --to=davej@redhat.com \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).