Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd92ef9f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: use %pK instead of %p which respects kptr_restrict sysctl"

parents a458ac83 f869a525
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1201,7 +1201,7 @@ static void ion_vm_open(struct vm_area_struct *vma)
	mutex_lock(&buffer->lock);
	list_add(&vma_list->list, &buffer->vmas);
	mutex_unlock(&buffer->lock);
	pr_debug("%s: adding %p\n", __func__, vma);
	pr_debug("%s: adding %pK\n", __func__, vma);
}

static void ion_vm_close(struct vm_area_struct *vma)
@@ -1216,7 +1216,7 @@ static void ion_vm_close(struct vm_area_struct *vma)
			continue;
		list_del(&vma_list->list);
		kfree(vma_list);
		pr_debug("%s: deleting %p\n", __func__, vma);
		pr_debug("%s: deleting %pK\n", __func__, vma);
		break;
	}
	mutex_unlock(&buffer->lock);
+3 −3
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,

	/* keep this for memory release */
	buffer->priv_virt = info;
	dev_dbg(dev, "Allocate buffer %p\n", buffer);
	dev_dbg(dev, "Allocate buffer %pK\n", buffer);
	return 0;

err:
@@ -107,7 +107,7 @@ static void ion_cma_free(struct ion_buffer *buffer)
	struct device *dev = buffer->heap->priv;
	struct ion_cma_buffer_info *info = buffer->priv_virt;

	dev_dbg(dev, "Release buffer %p\n", buffer);
	dev_dbg(dev, "Release buffer %pK\n", buffer);
	/* release memory */
	dma_free_coherent(dev, buffer->size, info->cpu_addr, info->handle);
	sg_free_table(info->table);
@@ -123,7 +123,7 @@ static int ion_cma_phys(struct ion_heap *heap, struct ion_buffer *buffer,
	struct device *dev = heap->priv;
	struct ion_cma_buffer_info *info = buffer->priv_virt;

	dev_dbg(dev, "Return buffer %p physical address %pa\n", buffer,
	dev_dbg(dev, "Return buffer %pK physical address %pa\n", buffer,
		&info->handle);

	*addr = info->handle;
+6 −6
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 *
 * Copyright (C) Linaro 2012
 * Author: <benjamin.gaignard@linaro.org> for ST-Ericsson.
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -501,7 +501,7 @@ retry:

	/* keep this for memory release */
	buffer->priv_virt = info;
	dev_dbg(sheap->dev, "Allocate buffer %p\n", buffer);
	dev_dbg(sheap->dev, "Allocate buffer %pK\n", buffer);
	return info;

err:
@@ -634,7 +634,7 @@ retry:
		sg = sg_next(sg);
	}
	buffer->priv_virt = info;
	dev_dbg(sheap->dev, "Allocate buffer %p\n", buffer);
	dev_dbg(sheap->dev, "Allocate buffer %pK\n", buffer);
	return info;

err2:
@@ -721,7 +721,7 @@ static void ion_secure_cma_free(struct ion_buffer *buffer)
	struct ion_secure_cma_buffer_info *info = buffer->priv_virt;
	int ret = 0;

	dev_dbg(sheap->dev, "Release buffer %p\n", buffer);
	dev_dbg(sheap->dev, "Release buffer %pK\n", buffer);
	if (msm_secure_v2_is_supported())
		ret = msm_unsecure_table(info->table);
	atomic_sub(buffer->size, &sheap->total_allocated);
@@ -743,8 +743,8 @@ static int ion_secure_cma_phys(struct ion_heap *heap, struct ion_buffer *buffer,
		container_of(heap, struct ion_cma_secure_heap, heap);
	struct ion_secure_cma_buffer_info *info = buffer->priv_virt;

	dev_dbg(sheap->dev, "Return buffer %p physical address 0x%pa\n", buffer,
		&info->phys);
	dev_dbg(sheap->dev, "Return buffer %pK physical address 0x%pa\n",
		buffer, &info->phys);

	*addr = info->phys;
	*len = buffer->size;
+2 −2
Original line number Diff line number Diff line
@@ -705,7 +705,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
		} else {
			handle = ion_import_dma_buf(client, data.flush_data.fd);
			if (IS_ERR(handle)) {
				pr_info("%s: Could not import handle: %p\n",
				pr_info("%s: Could not import handle: %pK\n",
					__func__, handle);
				return -EINVAL;
			}
@@ -718,7 +718,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
			+ data.flush_data.length;

		if (start && check_vaddr_bounds(start, end)) {
			pr_err("%s: virtual address %p is out of bounds\n",
			pr_err("%s: virtual address %pK is out of bounds\n",
				__func__, data.flush_data.vaddr);
			ret = -EINVAL;
		} else {