ALSA: pcm: Zero-clear reserved fields of PCM status ioctl in compat mode
authorTakashi Iwai <tiwai@suse.de>
Tue, 28 Oct 2014 11:42:19 +0000 (12:42 +0100)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:05:06 +0000 (17:05 +0800)
commitad82ca3bfb2b43a17c9434ce03cfb5a91c9221e4
treeb20c9f389aad61479c496272d1279ceb73e1ea13
parent358105b826419ac319ad05b398d40a31c52de90d
ALSA: pcm: Zero-clear reserved fields of PCM status ioctl in compat mode

commit 317168d0c766defd14b3d0e9c2c4a9a258b803ee upstream.

In compat mode, we copy each field of snd_pcm_status struct but don't
touch the reserved fields, and this leaves uninitialized values
there.  Meanwhile the native ioctl does zero-clear the whole
structure, so we should follow the same rule in compat mode, too.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Zefan Li <lizefan@huawei.com>
sound/core/pcm_compat.c