]> Pileus Git - ~andy/linux/commit
xen-gntdev: Avoid double-mapping memory
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Wed, 9 Feb 2011 21:11:32 +0000 (16:11 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 14 Feb 2011 19:16:22 +0000 (14:16 -0500)
commit12996fc38a2d760f3b30c9ceae26d0eeb92fe52d
tree2f41f71bff2077360c435c134f1d22217f89958e
parentb57c18694ea1641b691fa05ed8af0ce339fa430b
xen-gntdev: Avoid double-mapping memory

If an already-mapped area of the device was mapped into userspace a
second time, a hypercall was incorrectly made to remap the memory
again. Avoid the hypercall on later mmap calls, and fail the mmap call
if a writable mapping is attempted on a read-only range.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/gntdev.c