]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: timer: Remove kernel warning at compat ioctl error paths
authorTakashi Iwai <tiwai@suse.de>
Tue, 21 Nov 2017 15:36:11 +0000 (16:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:35:51 +0000 (08:35 +0000)
commit9f8eafa18a285d5d10e9df8e6622f592df78c037
treebd820be28882aba0942a553a36dd18948fc83918
parent2033ec9cc47915bfc11aa1719e80089b0f994c87
ALSA: timer: Remove kernel warning at compat ioctl error paths

commit 3d4e8303f2c747c8540a0a0126d0151514f6468b upstream.

Some timer compat ioctls have NULL checks of timer instance with
snd_BUG_ON() that bring up WARN_ON() when the debug option is set.
Actually the condition can be met in the normal situation and it's
confusing and bad to spew kernel warnings with stack trace there.
Let's remove snd_BUG_ON() invocation and replace with the simple
checks.  Also, correct the error code to EBADFD to follow the native
ioctl error handling.

Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/timer_compat.c