]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ALSA: usx2y: Suppress kernel warning at page allocation failures
authorTakashi Iwai <tiwai@suse.de>
Mon, 2 Oct 2017 12:06:43 +0000 (14:06 +0200)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 19 Oct 2017 12:05:24 +0000 (10:05 -0200)
commit8db3013392b03e55889e49af1f6f9c90b0ba2f70
tree137aadbcef8b93730dee461be58a1afd4c141605
parenta82c05e64a37b7cc184b085dd292107f8a3bc4de
ALSA: usx2y: Suppress kernel warning at page allocation failures

BugLink: http://bugs.launchpad.net/bugs/1724783
commit 7682e399485fe19622b6fd82510b1f4551e48a25 upstream.

The usx2y driver allocates the stream read/write buffers in continuous
pages depending on the stream setup, and this may spew the kernel
warning messages with a stack trace like:
  WARNING: CPU: 1 PID: 1846 at mm/page_alloc.c:3883
  __alloc_pages_slowpath+0x1ef2/0x2d70
  Modules linked in:
  CPU: 1 PID: 1846 Comm: kworker/1:2 Not tainted
  ....

It may confuse user as if it were any serious error, although this is
no fatal error and the driver handles the error case gracefully.
Since the driver has already some sanity check of the given size (128
and 256 pages), it can't pass any crazy value.  So it's merely page
fragmentation.

This patch adds __GFP_NOWARN to each caller for suppressing such
kernel warnings.  The original issue was spotted by syzkaller.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
sound/usb/usx2y/usb_stream.c