lkml.org 
[lkml]   [2018]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dmaengine: dmatest: Remove use of VLAs
On 2018-04-09 19:14, Laura Abbott wrote:
> On 04/09/2018 03:48 PM, Sinan Kaya wrote:
>> On 4/9/2018 5:06 PM, Laura Abbott wrote:
>>> + /* dst_cnt can't be more than u8 */
>>> + dma_addr_t dma_pq[255];
>>
>> This is 2k stack space on 64 bit architectures. Isn't that a lot?
>>
>
> Depends on your definition of 'a lot'. My assumption was that
> since this was a test module there would be some willingness
> to be a bit more generous. The problem is the array size is
> based off of the parameters passed in, although oddly enough
> it's based off of the minimum of two variables. If you have
> a suggestion for a tighter bound we can use that. Another
> option is to just switch to allocating the array with kmalloc.
> That might be reasonable here since there's other setup
> that happens before the test starts.

I think allocation is a better choice.

>
> Thanks,
> Laura
>
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html

\
 
 \ /
  Last update: 2018-04-10 01:19    [W:0.329 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site