summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-03-19 18:03:30 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-03-19 18:03:29 -0700
commit8e181ea4e865a2245124116afee0d9f71ccd43aa (patch)
treee5fbea9c76d0c0362d70a777f9d676ad71b421f7
parent7ac7fb2eca752c2fc9ab236ff42a5e800e07c234 (diff)
parent2503a05f0df4e1cea563de138c1f227941a3206d (diff)
Merge "ion: ensure valid start address"
-rw-r--r--drivers/staging/android/ion/msm/msm_ion.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/android/ion/msm/msm_ion.c b/drivers/staging/android/ion/msm/msm_ion.c
index 989d336c0648..7326aa46a8f6 100644
--- a/drivers/staging/android/ion/msm/msm_ion.c
+++ b/drivers/staging/android/ion/msm/msm_ion.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -745,7 +745,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
data.flush_data.offset;
end = start + data.flush_data.length;
- if (check_vaddr_bounds(start, end)) {
+ if (start && check_vaddr_bounds(start, end)) {
pr_err("%s: virtual address %pK is out of bounds\n",
__func__, data.flush_data.vaddr);
ret = -EINVAL;