From: Takashi Sakamoto Date: Wed, 12 Oct 2016 00:05:50 +0000 (+0900) Subject: ALSA: seq: fix passing wrong pointer in function call of compatibility layer X-Git-Tag: v4.9-rc1~4^2~1 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Flinux.git;a=commitdiff_plain;h=30c0702246ac1ba955aa97d698610169242f59f1 ALSA: seq: fix passing wrong pointer in function call of compatibility layer This commit is a fix for Linux 4.9-rc1. In former commit, a function call of compatibility layer for ALSA sequencer core was obsoleted by an alternative. Although, the alternative gets a pointer to kernel stack due to mis-programming. As a result, ALSA sequencer core unexpectedly refers over kernel stack. Reported-by: Dan Carpenter Fixes: 8ce8eb601c71 ("ALSA: seq: add an alternative way to handle ioctl requests") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/core/seq/seq_compat.c b/sound/core/seq/seq_compat.c index fce5697e4261..8c3507216676 100644 --- a/sound/core/seq/seq_compat.c +++ b/sound/core/seq/seq_compat.c @@ -58,7 +58,7 @@ static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsigned goto error; data->kernel = NULL; - err = snd_seq_kernel_client_ctl(client->number, cmd, &data); + err = snd_seq_kernel_client_ctl(client->number, cmd, data); if (err < 0) goto error;