diff options
| author | Trilok Soni <tsoni@codeaurora.org> | 2016-08-25 19:05:37 -0700 |
|---|---|---|
| committer | Trilok Soni <tsoni@codeaurora.org> | 2016-08-26 14:34:05 -0700 |
| commit | 5ab1e18aa3913d454e1bd1498b20ee581aae2c6b (patch) | |
| tree | 42bd10ef0bf5cdb8deb05656bf802c77dc580ff7 /drivers/misc/mic/scif/scif_rma.c | |
| parent | e97b6a0e0217f7c072fdad6c50673cd7a64348e1 (diff) | |
Revert "Merge remote-tracking branch 'msm-4.4/tmp-510d0a3f' into msm-4.4"
This reverts commit 9d6fd2c3e9fcfb ("Merge remote-tracking branch
'msm-4.4/tmp-510d0a3f' into msm-4.4"), because it breaks the
dump parsing tools due to kernel can be loaded anywhere in the memory
now and not fixed at linear mapping.
Change-Id: Id416f0a249d803442847d09ac47781147b0d0ee6
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Diffstat (limited to 'drivers/misc/mic/scif/scif_rma.c')
| -rw-r--r-- | drivers/misc/mic/scif/scif_rma.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/misc/mic/scif/scif_rma.c b/drivers/misc/mic/scif/scif_rma.c index 6a451bd65bf3..8310b4dbff06 100644 --- a/drivers/misc/mic/scif/scif_rma.c +++ b/drivers/misc/mic/scif/scif_rma.c @@ -1511,7 +1511,7 @@ off_t scif_register_pinned_pages(scif_epd_t epd, if ((map_flags & SCIF_MAP_FIXED) && ((ALIGN(offset, PAGE_SIZE) != offset) || (offset < 0) || - (len > LONG_MAX - offset))) + (offset + (off_t)len < offset))) return -EINVAL; might_sleep(); @@ -1614,7 +1614,7 @@ off_t scif_register(scif_epd_t epd, void *addr, size_t len, off_t offset, if ((map_flags & SCIF_MAP_FIXED) && ((ALIGN(offset, PAGE_SIZE) != offset) || (offset < 0) || - (len > LONG_MAX - offset))) + (offset + (off_t)len < offset))) return -EINVAL; /* Unsupported protection requested */ @@ -1732,8 +1732,7 @@ scif_unregister(scif_epd_t epd, off_t offset, size_t len) /* Offset is not page aligned or offset+len wraps around */ if ((ALIGN(offset, PAGE_SIZE) != offset) || - (offset < 0) || - (len > LONG_MAX - offset)) + (offset + (off_t)len < offset)) return -EINVAL; err = scif_verify_epd(ep); |
