]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: vx222: fix null-ptr-deref
authorTong Zhang <ztong0001@gmail.com>
Tue, 7 Sep 2021 01:47:45 +0000 (18:47 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 7 Sep 2021 05:13:19 +0000 (07:13 +0200)
commitcd0cc5222680be2a08052c045cab8565085aab63
tree424fb3ebc684431f3a526041df675b0a4af2527e
parent3ba6fd4ff1a4356623f0a149b5a805673c56085a
ALSA: vx222: fix null-ptr-deref

a recent refactor created a null pointer vx in snd_vx222_probe().
The vx pointer should have been populated in snd_vx222_create() as
suggested in earlier version, otherwise vx->core.ibl.size will throw an
error.

[    1.298398] BUG: kernel NULL pointer dereference, address: 00000000000001d8
[    1.316799] RIP: 0010:snd_vx222_probe+0x155/0x290 [snd_vx222]

Fixes: 193fd03eeebe ("ALSA: vx222: Allocate resources with device-managed APIs")
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20210907014746.1445278-1-ztong0001@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/vx222/vx222.c