]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: oss: Use kvzalloc() for local buffer allocations
authorTakashi Iwai <tiwai@suse.de>
Fri, 9 Nov 2018 10:59:45 +0000 (11:59 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Nov 2018 13:12:04 +0000 (14:12 +0100)
commit701918af452cffe2d91dfe67644b96c0bc1d9ea5
tree623d81067b0f9179871d1d64040faadffb4ec7ff
parentf624bba5baf4f7fca2cfd7c6623b1338fa2e2e77
ALSA: oss: Use kvzalloc() for local buffer allocations

PCM OSS layer may allocate a few temporary buffers, one for the core
read/write and another for the conversions via plugins.  Currently
both are allocated via vmalloc().  But as the allocation size is
equivalent with the PCM period size, the required size might be quite
small, depending on the application.

This patch replaces these vmalloc() calls with kvzalloc() for covering
small period sizes better.  Also, we use "z"-alloc variant here for
addressing the possible uninitialized access reported by syzkaller.

Reported-by: syzbot+1cb36954e127c98dd037@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c
sound/core/oss/pcm_plugin.c