Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334052

[PATCH 4.4 037/117] ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.4 037/117] ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check
Date 2016-02-15 01:50 +0100
Message-ID <r2fwu-1Sa-9@gated-at.bofh.it> (permalink)
References <r2dl0-tX-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit cc85f7a634cfaf9f0713c6aa06d08817424db37a upstream.

NULL user-space buffer can be passed even in a normal path, thus it's
not good to spew a kernel warning with stack trace at each time.
Just drop snd_BUG_ON() macro usage there.

BugLink: http://lkml.kernel.org/r/CACT4Y+YfVJ3L+q0i-4vyQVyyPD7V=OMX0PWPi29x9Bo3QaBLdw@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/core/rawmidi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -1224,7 +1224,7 @@ static long snd_rawmidi_kernel_write1(st
 	long count1, result;
 	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
-	if (snd_BUG_ON(!kernelbuf && !userbuf))
+	if (!kernelbuf && !userbuf)
 		return -EINVAL;
 	if (snd_BUG_ON(!runtime->buffer))
 		return -EINVAL;

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.4 000/117] 4.4.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 042/117] ALSA: pcm: Fix potential deadlock in OSS emulation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 077/117] iommu/io-pgtable-arm: Ensure we free the final level on teardown Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 074/117] tty: Wait interruptibly for tty lock on reopen Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 004/117] ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 046/117] ALSA: seq: Fix lockdep warnings due to double mutex locks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 069/117] usb: cdc-acm: send zero packet for intel 7260 modem Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 005/117] HID: usbhid: fix recursive deadlock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 065/117] USB: cp210x: add ID for IAI USB to RS485 adaptor Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 040/117] ALSA: hda/realtek - Support headset mode for ALC225 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 070/117] usb: phy: msm: fix error handling in probe. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 041/117] ALSA: hda/realtek - Support Dell headset mode for ALC225 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 007/117] block: fix bio splitting on max sectors Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 056/117] ALSA: hda - Fix speaker output from VAIO AiO machines Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 009/117] ocfs2/dlm: ignore cleaning the migration mle that is inuse Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 072/117] usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 057/117] ALSA: hda - Fix bad dereference of jack object Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 044/117] ALSA: seq: Fix yet another races among ALSA timer accesses Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
  [PATCH 4.4 019/117] parisc: Protect huge page pte changes with spinlocks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 016/117] tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 002/117] NFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 037/117] ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 031/117] ALSA: hda - disable dynamic clock gating on Broxton before reset Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 020/117] parisc: Fix __ARCH_SI_PREAMBLE_SIZE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 022/117] md/raid: only permit hot-add of compatible integrity profiles Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 023/117] hrtimer: Handle remaining time proper for TIME_LOW_RES Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 030/117] ALSA: Add missing dependency on CONFIG_SND_TIMER Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 038/117] ALSA: rawmidi: Fix race at copying & updating the position Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 021/117] [media] media: i2c: Dont export ir-kbd-i2c module alias Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 017/117] tracing/stacktrace: Show entire trace if passed in function not found Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 033/117] ALSA: dummy: Disable switching timer backend via sysfs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 034/117] ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 035/117] ALSA: seq: Degrade the error message for too many opens Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 006/117] base/platform: Fix platform drivers with no probe callback Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 018/117] printk: do cond_resched() between lines while outputting to consoles Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 036/117] ALSA: rawmidi: Make snd_rawmidi_transmit() race-free Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 028/117] ALSA: usb-audio: avoid freeing umidi object twice Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 026/117] ALSA: usb-audio: Fix OPPO HA-1 vendor ID Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 003/117] block: split bios to max possible length Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 039/117] ALSA: hda/realtek - New codec support of ALC225 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 027/117] ALSA: usb-audio: Add native DSD support for PS Audio NuWave DAC Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 015/117] PCI: Fix minimum allocation address overwrite Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 010/117] ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 032/117] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 025/117] ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  [PATCH 4.4 013/117] mtd: nand: assign reasonable default name for NAND drivers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
  Re: [PATCH 4.4 000/117] 4.4.2-stable review Guenter Roeck <linux@roeck-us.net> - 2016-02-15 17:00 +0100
  Re: [PATCH 4.4 000/117] 4.4.2-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-02-15 18:10 +0100

csiph-web