summaryrefslogtreecommitdiff
path: root/sound/core/oss/pcm_plugin.c
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2020-04-11 15:24:01 -0500
committerClark Williams <williams@redhat.com>2020-04-11 15:24:01 -0500
commitaf67c50835b80f904a3d138427e283538deffa98 (patch)
treed16af09bf76a9eba54d8acc43f7ce90eb0f63597 /sound/core/oss/pcm_plugin.c
parent17124a9c60e7d12becb893f35d51d9a5054a13e8 (diff)
parenta5ad06fc4b7b22f6df0c21b7052a82e039305a14 (diff)
downloadlinux-rt-af67c50835b80f904a3d138427e283538deffa98.tar.gz
Merge tag 'v4.9.218' into v4.9-rt
This is the 4.9.218 stable release * tag 'v4.9.218': Linux 4.9.218 perf map: Fix off by one in strncpy() size argument arm64: alternative: fix build with clang integrated assembler net: ks8851-ml: Fix IO operations, again bpf: Explicitly memset the bpf_attr structure vt: vt_ioctl: fix use-after-free in vt_in_use() locking/atomic, kref: Add kref_read() vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console vt: vt_ioctl: remove unnecessary console allocation checks vt: switch vt_dont_switch to bool vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines vt: selection, introduce vc_is_sel mac80211: fix authentication with iwlwifi/mvm mac80211: Check port authorization in the ieee80211_tx_dequeue() case media: xirlink_cit: add missing descriptor sanity checks media: stv06xx: add missing descriptor sanity checks media: dib0700: fix rc endpoint lookup media: ov519: add missing endpoint sanity checks libfs: fix infoleak in simple_attr_read() staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table media: usbtv: fix control-message timeouts media: flexcop-usb: fix endpoint sanity check usb: musb: fix crash with highmen PIO and usbmon USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback USB: cdc-acm: restore capability check order USB: serial: option: add Wistron Neweb D19Q1 USB: serial: option: add BroadMobi BM806U USB: serial: option: add support for ASKEY WWHC050 tools: Let O= makes handle a relative path with -C option Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger() Input: raydium_i2c_ts - use true and false for boolean values vti6: Fix memory leak of skb if input policy check fails netfilter: nft_fwd_netdev: validate family and chain type xfrm: policy: Fix doulbe free in xfrm_policy_timer xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire xfrm: fix uctx len check in verify_sec_ctx_len vti[6]: fix packet tx through bpf_redirect() in XinY cases genirq: Fix reference leaks on irq affinity notifiers mac80211: mark station unauthorized before key removal scsi: sd: Fix optimal I/O size for devices that change reported values scripts/dtc: Remove redundant YYLOC global declaration perf probe: Do not depend on dwfl_module_addrsym() ARM: dts: omap5: Add bus_dma_limit for L3 bus ARM: dts: dra7: Add bus_dma_limit for L3 bus i2c: hix5hd2: add missed clk_disable_unprepare in remove sxgbe: Fix off by one in samsung driver strncpy size arg mac80211: Do not send mesh HWMP PREQ if HWMP is disabled scsi: ipr: Fix softlockup when rescanning devices in petitboot dt-bindings: net: FMan erratum A050385 cpupower: avoid multiple definition with gcc -fno-common net: ipv4: don't let PMTU updates increase route MTU KVM: VMX: Do not allow reexecute_instruction() when skipping MMIO instr hsr: set .netnsok flag hsr: add restart routine into hsr_get_node_list() hsr: use rcu_read_lock() in hsr_get_node_{list/status}() net: mvneta: Fix the case where the last poll did not process all rx vxlan: check return value of gro_cells_init() slcan: not call free_netdev before rtnl_unlock in slcan_open NFC: fdp: Fix a signedness bug in fdp_nci_send_patch() net_sched: keep alloc_hash updated after hash allocation net_sched: cls_route: remove the right filter from hashtable net: dsa: Fix duplicate frames flooded by learning macsec: restrict to ethernet devices hsr: fix general protection fault in hsr_addr_is_self() Revert "drm/dp_mst: Skip validating ports during destruction, just ref" staging: greybus: loopback_test: fix potential path truncations staging: greybus: loopback_test: fix potential path truncation arm64: smp: fix smp_send_stop() behaviour ALSA: hda/realtek: Fix pop noise on ALC225 futex: Unbreak futex hashing futex: Fix inode life-time issue kbuild: Disable -Wpointer-to-enum-cast USB: cdc-acm: fix rounding error in TIOCSSERIAL USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL x86/mm: split vmalloc_sync_all() mm, slub: prevent kmalloc_node crashes and memory leaks mm: slub: be more careful about the double cmpxchg of freelist memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event rtc: max8907: add missing select REGMAP_IRQ intel_th: Fix user-visible error codes staging/speakup: fix get_word non-space look-ahead staging: rtl8188eu: Add device id for MERCUSYS MW150US v2 mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2 iio: magnetometer: ak8974: Fix negative raw values in sysfs ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks ALSA: pcm: oss: Avoid plugin buffer overflow ALSA: seq: oss: Fix running status after receiving sysex ALSA: seq: virmidi: Fix running status after receiving sysex ALSA: line6: Fix endless MIDI read loop USB: serial: pl2303: add device-id for HP LD381 usb: host: xhci-plat: add a shutdown USB: serial: option: add ME910G1 ECM composition 0x110b usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters USB: Disable LPM on WD19's Realtek Hub altera-stapl: altera_get_note: prevent write beyond end of 'key' drm/exynos: dsi: fix workaround for the legacy clock name drm/exynos: dsi: propagate error value and silence meaningless warning spi/zynqmp: remove entry that causes a cs glitch ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes powerpc: Include .BTF section spi: qup: call spi_qup_pm_resume_runtime before suspending Signed-off-by: Clark Williams <williams@redhat.com> Conflicts: kernel/irq/manage.c
Diffstat (limited to 'sound/core/oss/pcm_plugin.c')
-rw-r--r--sound/core/oss/pcm_plugin.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
index c6888d76ca5e..0e3dd6014ce5 100644
--- a/sound/core/oss/pcm_plugin.c
+++ b/sound/core/oss/pcm_plugin.c
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
while (plugin->next) {
if (plugin->dst_frames)
frames = plugin->dst_frames(plugin, frames);
- if (snd_BUG_ON((snd_pcm_sframes_t)frames <= 0))
+ if ((snd_pcm_sframes_t)frames <= 0)
return -ENXIO;
plugin = plugin->next;
err = snd_pcm_plugin_alloc(plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
while (plugin->prev) {
if (plugin->src_frames)
frames = plugin->src_frames(plugin, frames);
- if (snd_BUG_ON((snd_pcm_sframes_t)frames <= 0))
+ if ((snd_pcm_sframes_t)frames <= 0)
return -ENXIO;
plugin = plugin->prev;
err = snd_pcm_plugin_alloc(plugin, frames);
@@ -209,6 +209,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_p
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
plugin = snd_pcm_plug_last(plug);
while (plugin && drv_frames > 0) {
+ if (drv_frames > plugin->buf_frames)
+ drv_frames = plugin->buf_frames;
plugin_prev = plugin->prev;
if (plugin->src_frames)
drv_frames = plugin->src_frames(plugin, drv_frames);
@@ -220,6 +222,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_p
plugin_next = plugin->next;
if (plugin->dst_frames)
drv_frames = plugin->dst_frames(plugin, drv_frames);
+ if (drv_frames > plugin->buf_frames)
+ drv_frames = plugin->buf_frames;
plugin = plugin_next;
}
} else
@@ -248,11 +252,15 @@ snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *plug, snd_pc
if (frames < 0)
return frames;
}
+ if (frames > plugin->buf_frames)
+ frames = plugin->buf_frames;
plugin = plugin_next;
}
} else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
plugin = snd_pcm_plug_last(plug);
while (plugin) {
+ if (frames > plugin->buf_frames)
+ frames = plugin->buf_frames;
plugin_prev = plugin->prev;
if (plugin->src_frames) {
frames = plugin->src_frames(plugin, frames);