diff options
author | Tim Sell <Timothy.Sell@unisys.com> | 2016-03-01 19:45:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-01 19:14:07 -0800 |
commit | a8deaef37012aecc920996dd5a064b2417d9cbfa (patch) | |
tree | 5b8bd78e0147de7d7bcb08295820eefc874697c5 /drivers/staging/unisys | |
parent | staging: unisys: Update MAINTAINERS file (diff) | |
download | linux-dev-a8deaef37012aecc920996dd5a064b2417d9cbfa.tar.xz linux-dev-a8deaef37012aecc920996dd5a064b2417d9cbfa.zip |
staging: unisys: visorbus: fix payload memory usage in controlvm channel
Previously if controlvm message payloads (indicated in controlvm message
via struct controlvm_message.hdr.payload_vm_offset) were contained within
the bounds of the channel memory, we would fail to process any controlvm
message that contained payload data. Reason is, the request_mem_region()
would fail, because it overlapped the channel memory. Since
request_mem_region() doesn't actually serve a functional purpose anyway,
this was simply removed.
Signed-off-by: Timothy Sell <timothy.sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index c4c71c670446..e1a5b672fe6d 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -399,21 +399,13 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry) p = __va((unsigned long)(addr)); memcpy(ctx->data, p, bytes); } else { - void *mapping; + void *mapping = memremap(addr, bytes, MEMREMAP_WB); - if (!request_mem_region(addr, bytes, "visorchipset")) { - rc = NULL; - goto cleanup; - } - - mapping = memremap(addr, bytes, MEMREMAP_WB); if (!mapping) { - release_mem_region(addr, bytes); rc = NULL; goto cleanup; } memcpy(ctx->data, mapping, bytes); - release_mem_region(addr, bytes); memunmap(mapping); } |