android_kernel_sony_msm8994.../include/sound
Yogendra Charya Tangalapally 84d4c5a179 ANDROID: sound: rawmidi: Hold lock around realloc
The SNDRV_RAWMIDI_STREAM_{OUTPUT,INPUT} ioctls may reallocate
runtime->buffer while other kernel threads are accessing it.  If the
underlying krealloc() call frees the original buffer, then this can turn
into a use-after-free.
Most of these accesses happen while the thread is holding runtime->lock,
and can be fixed by just holding the same lock while replacing
runtime->buffer, however we can't hold this spinlock while
snd_rawmidi_kernel_{read1,write1} are copying to/from userspace.  We
need to add and acquire a new mutex to prevent this from happening
concurrently with reallocation.  We hold this mutex during the entire
reallocation process, to also prevent multiple concurrent reallocations
leading to a double-free.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
bug: 64315347
Change-Id: I05764d4f1a38f373eb7c0ac1c98607ee5ff0eded
[dcagle@codeaurora.org: Resolve trivial merge conflict]
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: d7193540482d11ff0ad3a07fc18717811641c6eb
Signed-off-by: Yogendra Charya Tangalapally <c_yctang@qti.qualcomm.com>
2020-05-18 01:34:34 +08:00
..
ac97_codec.h Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
aci.h ALSA: opti-miro: expose ACI mixer to outside drivers 2009-11-23 09:41:55 +01:00
ad1816a.h Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
ad1843.h
adau1373.h ASoC: Add ADAU1373 codec support 2011-08-17 00:53:54 +09:00
adsp_err.h sound: adsp_err: initial version of adsp error code header file. 2016-08-18 11:37:32 +05:30
aess.h ASoC: TI AESS: add autogating-enable function, callable from architecture code 2013-02-10 11:22:23 -07:00
ak4xxx-adda.h ALSA: ak4620 support, codec regs listed in proc 2009-09-21 15:44:51 +02:00
ak4113.h ALSA: ak411x: Fix stall in work callback 2015-02-11 14:48:17 +08:00
ak4114.h ALSA: ak411x: Fix stall in work callback 2015-02-11 14:48:17 +08:00
ak4117.h
ak4531_codec.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
ak4641.h ASoC: Asahi Kasei AK4641 codec driver 2011-05-19 14:10:45 -07:00
alc5623.h ASoC: add support for alc562[123] codecs 2010-10-21 13:51:13 -07:00
apr_audio-v2.h Merge remote-tracking branch 'caf/LA.BF64.1.2.3_rb1.6' into HEAD 2017-01-31 13:27:32 +01:00
apr_audio.h msm: qdsp6v2: reorganize kernel driver under misc drivers. 2013-12-24 11:11:10 +05:30
asequencer.h UAPI: (Scripted) Disintegrate include/sound 2012-10-09 09:49:13 +01:00
asound.h UAPI: (Scripted) Disintegrate include/sound 2012-10-09 09:49:13 +01:00
asoundef.h ALSA: Add definitions for CEA-861 Audio InfoFrames 2012-04-18 08:00:36 +02:00
atmel-abdac.h ALSA: Add ALSA driver for Atmel Audio Bitstream DAC 2009-02-05 15:08:48 +01:00
atmel-ac97c.h ALSA: Add ALSA driver for Atmel AC97 controller 2009-02-05 15:08:51 +01:00
audio_cal_utils.h ASoC: msm: qdsp6v2: Update calibration driver and voice driver 2014-08-21 18:24:24 -07:00
audio_calibration.h ASoC: qdsp6v2: Move calibration header files 2014-08-08 16:56:08 -07:00
audio_slimslave.h ASoC: msm: Add new slimbus slave driver 2013-12-18 13:52:15 -08:00
compress_driver.h ALSA: compress: Add support to send codec specific data 2015-09-03 11:55:45 -07:00
control.h ALSA: add/change some comments describing function return values 2013-03-12 08:32:53 +01:00
core.h Merge upstream tag 'v3.10.49' into msm-3.10 2014-08-20 13:23:09 -07:00
cpe_cmi.h ASoC: wcd_cpe_services: Change boot event to include SFR details 2015-01-23 18:27:05 -08:00
cpe_core.h ASoC: msm-cpe-lsm: Synchronize LAB thread start and stop 2014-12-04 11:41:23 -08:00
cs42l52.h ASoC: Add support for CS42L52 Codec 2012-04-30 23:36:20 +01:00
cs4231-regs.h ALSA: cs4236: update control names 2009-11-18 07:23:16 +01:00
cs4271.h ALSA: ASoC: cs4271: add optional soft reset workaround 2012-12-24 15:53:28 +00:00
cs8403.h
cs8427.h ASoC: msm: Moving the gpio request and free in probe and exit. 2013-09-04 15:34:44 -07:00
da7213.h ASoC: codecs: Add da7213 codec 2013-02-14 17:27:17 +00:00
da9055.h ASoC: codecs: Add DA9055 codec driver 2012-09-28 14:21:54 +01:00
designware_i2s.h ASoC: Add support for synopsys i2s controller as per ASoC framework. 2012-06-22 10:25:45 +01:00
dmaengine_pcm.h ASoC: generic-dmaengine-pcm: Add support for half-duplex 2013-04-22 11:27:04 +01:00
emu10k1_synth.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
emu10k1.h ALSA: emu10k1: Emu10k2 32 bit DMA mode 2015-05-13 05:15:41 -07:00
emu8000_reg.h
emu8000.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
emux_legacy.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
emux_synth.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
es1688.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
gus.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
hda_hwdep.h
hwdep.h ALSA: hwdep - Fix coding style 2009-02-05 09:17:50 +01:00
i2c.h
info.h switch procfs to umode_t use 2012-01-03 22:54:56 -05:00
initval.h ALSA: isa: Move snd_legacy_find_free_ioport to initval.h 2012-08-03 12:57:44 +02:00
jack.h 32.1.A.1.185 2016-04-09 16:46:03 +02:00
l3.h
max9768.h ASoC: max9768: add driver for max9768 amplifier 2012-01-30 21:50:55 +00:00
max98088.h ASoC: Restore MAX98088 CODEC driver 2010-10-18 16:46:27 -07:00
max98090.h ASoC:: max98090: Remove executable bit 2013-03-20 10:54:12 +01:00
max98095.h ASoC: max98095: Single bit bitfields should be unsigned 2012-05-13 23:33:53 +01:00
memalloc.h ALSA: memalloc.h - fix wrong truncation of dma_addr_t 2013-12-20 07:45:06 -08:00
minors.h ALSA: core: add support for compressed devices 2011-12-23 10:07:46 +01:00
mixer_oss.h ALSA: core: sparse cleanups 2011-02-14 17:10:11 +01:00
mpu401.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
msm-audio-effects-q6-v2.h ASoC: msm: audio-effects: fix stack overread and heap overwrite 2016-08-30 23:46:55 -07:00
msm-dai-q6-v2.h ASoC: msm: Remove usage of dev_set_name in audio drivers 2014-11-03 20:56:19 -08:00
msm-slim-dma.h ASoC: msm: Add CPU DAI driver for apps owned slimbus ports 2014-10-02 12:33:36 -07:00
opl3.h
opl4.h
pcm_oss.h ALSA: pcm_lib - cleanup & merge hw_ptr update functions 2010-01-07 15:47:38 +01:00
pcm_params.h ALSA: Add missing include of pcm.h to pcm_params.h 2012-06-20 12:00:59 +02:00
pcm-indirect.h
pcm.h ASoC: core: Support for compress ioctls 2014-05-08 11:58:04 -07:00
pt2258.h
pxa2xx-lib.h [ARM] pxa: merge AC97 platform data structures 2009-04-15 10:54:06 +08:00
q6adm-v2.h Merge remote-tracking branch 'caf/LA.BF64.1.2.3_rb1.15' into HEAD 2017-09-02 17:48:55 +02:00
q6afe-v2.h ASoC: msm: Turn on/off the clock before/after accessing afe mux register 2014-11-13 10:12:27 -08:00
q6asm-v2.h Merge remote-tracking branch 'caf/LA.BF64.1.2.3_rb1.6' into HEAD 2017-01-31 13:27:32 +01:00
q6audio-v2.h msm: qdsp6v2: reorganize kernel driver under misc drivers. 2013-12-24 11:11:10 +05:30
q6core.h ASoC: msm: Integrate Eagle framework to support HeadphoneX 2014-07-21 10:41:13 -07:00
q6lsm.h 32.2.A.5.11 2016-12-05 22:37:37 +01:00
rawmidi.h ANDROID: sound: rawmidi: Hold lock around realloc 2020-05-18 01:34:34 +08:00
s3c24xx_uda134x.h
sb16_csp.h UAPI: (Scripted) Disintegrate include/sound 2012-10-09 09:49:13 +01:00
sb.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
seq_device.h
seq_kernel.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
seq_midi_emul.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
seq_midi_event.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
seq_oss_legacy.h
seq_oss.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
seq_virmidi.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
sh_dac_audio.h ALSA: sh: add SuperH DAC audio driver for ALSA V4 2009-11-04 09:17:40 +01:00
sh_fsi.h ASoC: fsi: cleanup sh_fsi.h 2012-12-24 15:57:20 +00:00
simple_card.h ASoC: simple-card: add asoc_simple_dai for initializing 2013-01-14 06:55:43 +09:00
snd_wavefront.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
soc-dai.h ASoC: core: Add support for getting TX and RX channels 2013-09-04 17:23:43 -07:00
soc-dapm.h ASoC: wcd9320: Codec changes kernel 3.10 upgrade 2013-09-04 17:23:44 -07:00
soc-dpcm.h ASoC: Cold start latency reduction 2014-04-21 18:13:04 -07:00
soc.h ASoC: Cold start latency reduction 2014-04-21 18:13:04 -07:00
soundfont.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
spear_dma.h ASoC: Add support for SPEAr ASoC pcm layer. 2012-06-22 10:27:29 +01:00
spear_spdif.h ASoC: SPEAr spdif_in: Add spdif IN support 2012-06-23 11:58:10 +01:00
sta32x.h ASoC: sta32x: add workaround for ESD reset issue 2011-11-14 21:36:43 +00:00
tas5086.h ALSA: ASoC: add codec driver for TI TAS5086 2013-03-08 21:06:09 +08:00
tea575x-tuner.h [media] radio-shark: Add support for suspend & resume 2012-09-13 17:42:12 -03:00
tea6330t.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
timer.h
tlv320aic3x.h ASoC: tlv320aic3x: Convert mic bias to a supply widget 2013-02-04 18:35:19 +00:00
tlv320aic32x4.h ASoC: tlv320aic32x4: Add rstn gpio to platform data. 2012-11-01 14:35:56 +00:00
tlv320dac33-plat.h ASoC: tlv320dac33: Update e-mail address 2011-05-11 16:12:35 +01:00
tlv.h ALSA: Add comment for control TLV API 2013-05-08 15:43:56 +02:00
tpa6130a2-plat.h ASoC: tpa6130a2: Remove model_id from platform data 2011-09-21 16:07:45 +01:00
uda134x.h ASoC: uda134x: replace a macro with a value in platform struct. 2010-06-25 12:29:01 +01:00
uda1380.h ASoC: UDA1380: refactor device registration 2009-06-15 21:54:48 +01:00
util_mem.h
voice_params.h msm: ASoC: Implement local call hold 2013-09-04 16:39:00 -07:00
voice_svc.h msm: Add driver to communicate with voice services on DSP over APR 2014-04-11 02:57:58 -07:00
vx_core.h ALSA: vx: hard dependency on the standard fw loader 2012-11-22 17:48:01 +01:00
wavefront.h
wm0010.h ASoC: wm0010: Add initial wm0010 DSP driver 2012-08-23 16:12:12 +01:00
wm1250-ev1.h ASoC: Add platform data for WM1250 EV1 GPIOs 2011-09-23 17:05:38 +01:00
wm2000.h ASoC: wm2000: Use clock API integration to configure MCLK divisor 2012-12-24 15:42:35 +00:00
wm2200.h ASoC: wm2200: Provide platform data for MICBIAS configuration 2013-02-05 15:53:07 +00:00
wm5100.h ASoC: Add WM5100 driver 2011-09-20 16:02:16 +01:00
wm8903.h ASoC: WM8903: Fix platform data gpio_cfg confusion 2011-12-06 10:29:22 +00:00
wm8904.h Merge tag 'v3.10.93' into lineage-15.1 2020-05-18 01:34:34 +08:00
wm8955.h ASoC: Add initial WM8955 CODEC driver 2009-12-18 13:06:47 +00:00
wm8960.h ASoC: wm8960: remove 'dres' field from platform data structure 2012-09-21 08:35:06 -04:00
wm8962.h ASoC: wm8962: Optimise power consumption for IN4 DC measurement usage 2012-01-24 21:19:45 +00:00
wm8993.h ASoC: wm_hubs: Allow configuration of MICBIAS power up delay via pdata 2012-08-22 19:00:37 +01:00
wm8996.h ASoC: Rename WM8915 to WM8996 2011-08-08 14:30:37 +09:00
wm9081.h ASoC: Add platform data for WM9081 IRQ pin configuration 2011-03-01 23:30:53 +00:00
wm9090.h ASoC: Add WM9090 amplifier driver 2010-04-30 16:12:44 +01:00
wss.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00