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

Commit 07ea5752 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: use %pK instead of %p which respects kptr_restrict sysctl" into msm-4.9

parents 5263e22f 3c70282d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1222,7 +1222,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)
@@ -1237,7 +1237,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
@@ -98,7 +98,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:
@@ -111,7 +111,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);
@@ -127,7 +127,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;
+2 −2
Original line number Diff line number Diff line
@@ -678,7 +678,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
			handle = ion_import_dma_buf_fd(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;
			}
@@ -691,7 +691,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
			+ data.flush_data.length;

		if (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 {