]> Pileus Git - ~andy/linux/commit
crypto/nx/nx-842: Fix handling of vmalloc addresses
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Wed, 29 Jan 2014 16:34:56 +0000 (10:34 -0600)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 11 Feb 2014 00:24:49 +0000 (11:24 +1100)
commit0ba3e1011660042dd3ea08ae8dbdc173352f3d47
tree0c607f637f0c0bbb8120f424a0f206f45d796de9
parent8d4887ee30695d6b092e96029ae974505c43bfb6
crypto/nx/nx-842: Fix handling of vmalloc addresses

The powerpc specific nx-842 compression driver does not currently
handle translating a vmalloc address to a physical address.

The current driver uses __pa() for all addresses which does not
properly handle vmalloc addresses and thus causes a failure since
we do not pass a proper physical address to the hypervisor.

This patch adds a routine to convert an address to a physical
address by checking for vmalloc addresses and handling them properly.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
 ---
 drivers/crypto/nx/nx-842.c |   29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/crypto/nx/nx-842.c