diff options
author | David Mosberger <davidm@napali.hpl.hp.com> | 2004-07-28 09:01:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-28 09:01:30 -0700 |
commit | cf8b1162bcbd2c3d5259e83de3c41bec5cd45435 (patch) | |
tree | 69f2bad7f193b38d7722b46b6584de4b0ab3b260 /mm | |
parent | f97804ea2a7a4a68919af7acf196cd54e24a959a (diff) | |
download | history-cf8b1162bcbd2c3d5259e83de3c41bec5cd45435.tar.gz |
[PATCH] Make get_user_pages() work again for ia64 gate area
Changeset
roland@redhat.com[torvalds]|ChangeSet|20040624165002|30880
inadvertently broke ia64 because the patch assumed that pgd_offset_k() is
just an optimization of pgd_offset(), which it is not. This patch fixes
the problem by introducing pgd_offset_gate(). On architectures on which
the gate area lives in the user's address-space, this should be aliased to
pgd_offset() and on architectures on which the gate area lives in the
kernel-mapped segment, this should be aliased to pgd_offset_k().
This bug was found and tracked down by Peter Chubb.
Signed-off-by: <davidm@hpl.hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index 8738b38ac628b9..05ff4993852b0e 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -727,7 +727,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, pte_t *pte; if (write) /* user gate pages are read-only */ return i ? : -EFAULT; - pgd = pgd_offset(mm, pg); + pgd = pgd_offset_gate(mm, pg); if (!pgd) return i ? : -EFAULT; pmd = pmd_offset(pgd, pg); |