From: Greg Kroah-Hartman Date: Mon, 18 Apr 2016 01:40:23 +0000 (+0900) Subject: 4.5-stable patches X-Git-Tag: v3.14.67~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fac0232a43ac11eeb3166343ef5831baaf2ec57;p=thirdparty%2Fkernel%2Fstable-queue.git 4.5-stable patches added patches: staging-android-ion-set-the-length-of-the-dma-sg-entries-in-buffer.patch --- diff --git a/queue-4.5/series b/queue-4.5/series index 379016e38b4..5aa502505c9 100644 --- a/queue-4.5/series +++ b/queue-4.5/series @@ -121,3 +121,4 @@ alsa-usb-audio-add-a-quirk-for-plantronics-bt300.patch alsa-usb-audio-skip-volume-controls-triggers-hangup-on-dell-usb-dock.patch hid-wacom-fix-bamboo-one-oops.patch hid-usbhid-fix-inconsistent-reset-resume-reset-resume-behavior.patch +staging-android-ion-set-the-length-of-the-dma-sg-entries-in-buffer.patch diff --git a/queue-4.5/staging-android-ion-set-the-length-of-the-dma-sg-entries-in-buffer.patch b/queue-4.5/staging-android-ion-set-the-length-of-the-dma-sg-entries-in-buffer.patch new file mode 100644 index 00000000000..e47d197d0b3 --- /dev/null +++ b/queue-4.5/staging-android-ion-set-the-length-of-the-dma-sg-entries-in-buffer.patch @@ -0,0 +1,36 @@ +From 70bc916b2c80913753fb188d4daee50a64d21ba0 Mon Sep 17 00:00:00 2001 +From: Liviu Dudau +Date: Thu, 21 Jan 2016 11:57:47 +0000 +Subject: staging: android: ion: Set the length of the DMA sg entries in buffer + +From: Liviu Dudau + +commit 70bc916b2c80913753fb188d4daee50a64d21ba0 upstream. + +ion_buffer_create() will allocate a buffer and then create a DMA +mapping for it, but it forgot to set the length of the page entries. + +Signed-off-by: Liviu Dudau +Signed-off-by: Jon Medhurst +Acked-by: Laura Abbott +Cc: Shawn Guo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/android/ion/ion.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/staging/android/ion/ion.c ++++ b/drivers/staging/android/ion/ion.c +@@ -251,8 +251,10 @@ static struct ion_buffer *ion_buffer_cre + * memory coming from the heaps is ready for dma, ie if it has a + * cached mapping that mapping has been invalidated + */ +- for_each_sg(buffer->sg_table->sgl, sg, buffer->sg_table->nents, i) ++ for_each_sg(buffer->sg_table->sgl, sg, buffer->sg_table->nents, i) { + sg_dma_address(sg) = sg_phys(sg); ++ sg_dma_len(sg) = sg->length; ++ } + mutex_lock(&dev->buffer_lock); + ion_buffer_add(dev, buffer); + mutex_unlock(&dev->buffer_lock);