Merge "ion: ensure valid start address"

This commit is contained in:
Linux Build Service Account 2018-03-19 18:03:30 -07:00 committed by Gerrit - the friendly Code Review server
commit 8e181ea4e8

View file

@ -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;