22 Aug
2019
22 Aug
'19
7:18 p.m.
On Tue, Aug 20, 2019 at 02:05:06PM +0900, Kuninori Morimoto wrote:
Current ALSA SoC might allocate debugfs name memory via kasprintf(), but, it is unnecessary and the code becoming very complex. Using local variable with appropriate size is enough.
This patch uses 64byte local variable for it.
Is it enough though? It'd be a very long name but as soon as you start putting a fixed limit in you're tempting fate a bit.
The other potential issue is that it's a relatively large allocation to do on the stack and while we're probably fine it still doesn't feel great.