diff options
| author | Adam Litke <[email protected]> | 2007-11-14 16:59:33 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-11-14 18:45:39 -0800 |
| commit | 5b23dbe8173c212d6a326e35347b038705603d39 (patch) | |
| tree | a971d3cbab8911e7cbd5bec66f50d093f3f45976 /include/linux/timerqueue.h | |
| parent | 19cd7537bdae6685c31677a01e08850612ba87f6 (diff) | |
hugetlb: follow_hugetlb_page() for write access
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.
[[email protected]: build fix]
Signed-off-by: Adam Litke <[email protected]>
Reviewed-by: Ken Chen <[email protected]>
Cc: David Gibson <[email protected]>
Cc: William Lee Irwin III <[email protected]>
Cc: Badari Pulavarty <[email protected]>
Signed-off-by: Erez Zadok <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions