linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* staging: Unwritten function for ion_carveout_heap.c
@ 2014-07-23 20:04 Nick Krause
  2014-07-23 20:10 ` Colin Cross
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Krause @ 2014-07-23 20:04 UTC (permalink / raw)
  To: Greg KH
  Cc: john.stultz, ccross, rebecca, Laura Abbott, gioh.kim,
	benjamin.gaignard, devel, linux-kernel

Hey Greg and others.
Sorry for another email but it seems the function,
ion_carveout_heap_unmap_dma is
just returning and not doing anything useful. Furthermore I am new so
I don't known how
to write this function but this may  be causing  some rather  serious
bugs as if the dma heap
is not unmaped and we  call this function a lot this will make the
kernel not able to handle dma requests
for this driver and other drivers that need this and in turn lead to
a oops or even a kernel panic due to leaked
dma allocated memory. I would recommend writing this function or
helping me write it in
other to avoid some rather serious bugs without a proper dma unmapping
function for this driver  :).
Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: staging: Unwritten function for ion_carveout_heap.c
  2014-07-23 20:04 staging: Unwritten function for ion_carveout_heap.c Nick Krause
@ 2014-07-23 20:10 ` Colin Cross
  2014-07-23 20:24   ` Nick Krause
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Cross @ 2014-07-23 20:10 UTC (permalink / raw)
  To: Nick Krause
  Cc: Greg KH, John Stultz, Rebecca Zavin, Laura Abbott, gioh.kim,
	benjamin.gaignard, devel, linux-kernel

On Wed, Jul 23, 2014 at 1:04 PM, Nick Krause <xerofoify@gmail.com> wrote:
> Hey Greg and others.
> Sorry for another email but it seems the function,
> ion_carveout_heap_unmap_dma is
> just returning and not doing anything useful. Furthermore I am new so
> I don't known how
> to write this function but this may  be causing  some rather  serious
> bugs as if the dma heap
> is not unmaped and we  call this function a lot this will make the
> kernel not able to handle dma requests
> for this driver and other drivers that need this and in turn lead to
> a oops or even a kernel panic due to leaked
> dma allocated memory. I would recommend writing this function or
> helping me write it in
> other to avoid some rather serious bugs without a proper dma unmapping
> function for this driver  :).
> Nick

Look at ion_carveout_heap_map_dma - it doesn't do anything, it just
returns a pre-existing virtual address.  That means there is nothing
to do in unmap.

map_dma is actually a bit of a misnomer here, as the actual mapping is
done in ion_map_dma_buf.  All ion_carveout_heap_map_dma does is return
the sg table for ion_map_dma_buf to pass to dma_map_sg.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: staging: Unwritten function for ion_carveout_heap.c
  2014-07-23 20:10 ` Colin Cross
@ 2014-07-23 20:24   ` Nick Krause
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Krause @ 2014-07-23 20:24 UTC (permalink / raw)
  To: Colin Cross
  Cc: Greg KH, John Stultz, Rebecca Zavin, Laura Abbott, gioh.kim,
	benjamin.gaignard, devel, linux-kernel

On Wed, Jul 23, 2014 at 4:10 PM, Colin Cross <ccross@android.com> wrote:
> On Wed, Jul 23, 2014 at 1:04 PM, Nick Krause <xerofoify@gmail.com> wrote:
>> Hey Greg and others.
>> Sorry for another email but it seems the function,
>> ion_carveout_heap_unmap_dma is
>> just returning and not doing anything useful. Furthermore I am new so
>> I don't known how
>> to write this function but this may  be causing  some rather  serious
>> bugs as if the dma heap
>> is not unmaped and we  call this function a lot this will make the
>> kernel not able to handle dma requests
>> for this driver and other drivers that need this and in turn lead to
>> a oops or even a kernel panic due to leaked
>> dma allocated memory. I would recommend writing this function or
>> helping me write it in
>> other to avoid some rather serious bugs without a proper dma unmapping
>> function for this driver  :).
>> Nick
>
> Look at ion_carveout_heap_map_dma - it doesn't do anything, it just
> returns a pre-existing virtual address.  That means there is nothing
> to do in unmap.
>
> map_dma is actually a bit of a misnomer here, as the actual mapping is
> done in ion_map_dma_buf.  All ion_carveout_heap_map_dma does is return
> the sg table for ion_map_dma_buf to pass to dma_map_sg.


Very well then I guess this is closed then.
Cheers Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-23 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-23 20:04 staging: Unwritten function for ion_carveout_heap.c Nick Krause
2014-07-23 20:10 ` Colin Cross
2014-07-23 20:24   ` Nick Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).