Re: [PATCH resend 05/11] ASoC: soc-core: don't alloc memory carelessly when creating debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux