From: Dan Carpenter <dan.carpenter@oracle.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Jan Kara <jack@suse.cz>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Lorenzo Stoakes <lstoakes@gmail.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Dan Williams <dan.j.williams@intel.com>,
linux-mm@kvack.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch linux-next] userfaultfd: hugetlbfs: unmap the correct pointer
Date: Fri, 13 Jan 2017 11:16:10 +0300 [thread overview]
Message-ID: <20170113081610.GC4188@mwanda> (raw)
In-Reply-To: <20170112193327.GB8558@dhcp22.suse.cz>
On Thu, Jan 12, 2017 at 08:33:27PM +0100, Michal Hocko wrote:
> On Thu 12-01-17 22:20:52, Dan Carpenter wrote:
> > kunmap_atomic() and kunmap() take different pointers. People often get
> > these mixed up.
> >
> > Fixes: 16374db2e9a0 ("userfaultfd: hugetlbfs: fix __mcopy_atomic_hugetlb retry/error processing")
>
> This looks like a linux-next sha1. This is not stable and will change...
>
Yeah. But probably Andrew is just going to fold it into the original
anyway. Probably most of linux-next trees don't rebase so the hash is
good and the people who rebase fold it in so it doesn't show up in the
released code. It basically never hurts to have the Fixes tag.
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/mm/memory.c b/mm/memory.c
> > index 6012a05..dfd3604 100644
> > --- a/mm/memory.c
> > +++ b/mm/memory.c
> > @@ -4172,7 +4172,7 @@ long copy_huge_page_from_user(struct page *dst_page,
> > (const void __user *)(src + i * PAGE_SIZE),
> > PAGE_SIZE);
> > if (allow_pagefault)
> > - kunmap(page_kaddr);
> > + kunmap(dst_page + 1);
>
> I guess you meant dst_page + i
Huh. I would have sworn I copy and pasted this. Anyway, thanks for
catching this. I will resend.
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>
next prev parent reply other threads:[~2017-01-13 8:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 19:20 Dan Carpenter
2017-01-12 19:33 ` Michal Hocko
2017-01-13 8:16 ` Dan Carpenter [this message]
2017-01-13 8:26 ` Michal Hocko
2017-01-13 8:40 ` Dan Carpenter
2017-01-13 8:26 ` [patch v2 " Dan Carpenter
2017-01-13 8:40 ` Michal Hocko
2017-01-13 16:29 ` Mike Kravetz
2017-01-14 0:02 ` Hugh Dickins
2017-01-14 0:13 ` Andrew Morton
2017-01-14 6:56 ` Dan Carpenter
2017-01-14 6:55 ` Dan Carpenter
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=20170113081610.GC4188@mwanda \
--to=dan.carpenter@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=jack@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=ross.zwisler@linux.intel.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