diff options
| author | Pratap Nirujogi <pratapn@codeaurora.org> | 2018-03-18 17:46:33 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-03-19 06:40:03 -0700 |
| commit | 2503a05f0df4e1cea563de138c1f227941a3206d (patch) | |
| tree | d9a6a93a1a7bae2eb49f44815faf94d032a746ca | |
| parent | 0d8bfae571deca20364d1e9ea8c160ae03485a91 (diff) | |
ion: ensure valid start address
Ensure valid start address to check for vaddress
bounds.
Change-Id: I02c0ce85d9a495880c133e66553b09159daa8f0c
Signed-off-by: Pratap Nirujogi <pratapn@codeaurora.org>
| -rw-r--r-- | drivers/staging/android/ion/msm/msm_ion.c | 4 |
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; |
