From: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
To: Adam Litke <agl@us.ibm.com>
Cc: linuxppc-dev@ozlabs.org,
Andrew Morton <akpm@linux-foundation.org>,
Ken Chen <kenchen@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hugetlb: follow_hugetlb_page for write access
Date: Mon, 19 Nov 2007 16:25:00 +0100 [thread overview]
Message-ID: <200711191625.00882.hnguyen@linux.vnet.ibm.com> (raw)
In-Reply-To: <20071107195142.13505.49398.stgit@kernel>
On Wednesday 07 November 2007 20:51, Adam Litke wrote:
>
> When calling get_user_pages(), a write flag is passed in by the caller to
> indicate if write access is required on the faulted-in pages. Currently,
> follow_hugetlb_page() ignores this flag and always faults pages for
> read-only access. This can cause data corruption because a device driver
> that calls get_user_pages() with write set will not expect COW faults to
> occur on the returned pages.
>
> This patch passes the write flag down to follow_hugetlb_page() and makes
> sure hugetlb_fault() is called with the right write_access parameter.
>
> Signed-off-by: Adam Litke <agl@us.ibm.com>
Apologize for this late response.
Tested on 2.6.23 with ehca and mthca. It works like a charm for me.
Thanks!
Nam
prev parent reply other threads:[~2007-11-19 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 19:51 [PATCH] hugetlb: follow_hugetlb_page for write access Adam Litke
2007-11-08 20:43 ` Ken Chen
2007-11-19 15:25 ` Hoang-Nam Nguyen [this message]
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=200711191625.00882.hnguyen@linux.vnet.ibm.com \
--to=hnguyen@linux.vnet.ibm.com \
--cc=agl@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kenchen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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).