]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PATCH] Fix crash when ptrace poking hugepage areas
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 30 Nov 2005 03:46:37 +0000 (19:46 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 14 Dec 2005 23:42:54 +0000 (15:42 -0800)
commitd948e779d14768cee4077ad5b477d58d42b20371
tree67b71390cc71b6ab2c4c6d3594a4252cecbf23bd
parent2d6eac6c4fdaa69656d66c80754d267be233cc3f
[PATCH] Fix crash when ptrace poking hugepage areas

set_page_dirty() will not cope with being handed a page * which is part of
a compound page, but not the master page in that compound page.  This case
can occur via access_process_vm() if you attemp to write to another
process's hugepage memory area using ptrace() (causing an oops or hang).

This patch fixes the bug by only calling set_page_dirty() from
access_process_vm() if the page is not a compound page.  We already use a
similar fix in bio_set_pages_dirty() for the case of direct io to
hugepages.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/ptrace.c