WSL2-Linux-Kernel/include/sound
Takashi Iwai 5803b02388 ALSA: seq: Fix copy_from_user() call inside lock
The event handler in the virmidi sequencer code takes a read-lock for
the linked list traverse, while it's calling snd_seq_dump_var_event()
in the loop.  The latter function may expand the user-space data
depending on the event type.  It eventually invokes copy_from_user(),
which might be a potential dead-lock.

The sequencer core guarantees that the user-space data is passed only
with atomic=0 argument, but snd_virmidi_dev_receive_event() ignores it
and always takes read-lock().  For avoiding the problem above, this
patch introduces rwsem for non-atomic case, while keeping rwlock for
atomic case.

Also while we're at it: the superfluous irq flags is dropped in
snd_virmidi_input_open().

Reported-by: Jia-Ju Bai <baijiaju1990@163.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-09 14:10:13 +02:00
..
ac97_codec.h
aci.h
ad1816a.h
ad1843.h
adau1373.h
aess.h
ak4xxx-adda.h
ak4113.h ALSA: ak411x: Use array instead of offsetof() 2017-05-17 07:13:03 +02:00
ak4114.h ALSA: ak411x: Use array instead of offsetof() 2017-05-17 07:13:03 +02:00
ak4117.h ALSA: ak411x: Use array instead of offsetof() 2017-05-17 07:13:03 +02:00
ak4531_codec.h
ak4641.h
alc5623.h
asequencer.h
asound.h
asoundef.h
compress_driver.h ALSA: compress: Fix kernel-doc warnings 2016-11-15 07:28:15 +01:00
control.h sched/headers: Prepare to remove spurious <linux/sched.h> inclusion dependencies 2017-03-02 08:42:41 +01:00
core.h ALSA: Get rid of card power_lock 2017-08-30 20:44:29 +02:00
cs35l33.h
cs35l34.h ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver. 2016-10-21 12:02:44 +01:00
cs35l35.h ASoC: cs35l35: Add Boost Inductor Calculation 2017-05-19 17:31:34 +01:00
cs42l52.h
cs42l56.h
cs42l73.h
cs4231-regs.h
cs4271.h
cs8403.h
cs8427.h
da7213.h
da7218.h
da7219-aad.h
da7219.h
da9055.h
designware_i2s.h ASoC: dwc: Added a quirk DW_I2S_QUIRK_16BIT_IDX_OVERRIDE to dwc driver 2017-06-28 19:01:12 +01:00
dmaengine_pcm.h ASoC: Revert "Drop SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag" 2017-01-23 18:16:33 +00:00
emu10k1.h ALSA: emu10k1: Use workqueue instead of kthread for emu1010 fw polling 2016-11-15 08:21:19 +01:00
emu10k1_synth.h
emu8000.h
emu8000_reg.h
emux_legacy.h
emux_synth.h ALSA: seq: Allow the tristate build of OSS emulation 2017-06-09 22:09:45 +02:00
es1688.h
gus.h
hda_chmap.h
hda_hwdep.h
hda_i915.h
hda_register.h ALSA: hda - add more ML register definitions 2017-04-07 10:39:18 +02:00
hda_regmap.h
hda_verbs.h ALSA: hda - program ICT bits to support HBR audio 2017-09-20 12:01:01 +02:00
hdaudio.h ALSA: hda - Avoid tricky macros 2017-04-03 08:42:43 +02:00
hdaudio_ext.h
hdmi-codec.h ASoC: hdmi-codec: add .get_dai_id support 2017-05-24 18:45:29 +01:00
hwdep.h
i2c.h
info.h
initval.h
jack.h
l3.h
max9768.h
max98088.h
max98090.h
max98095.h
memalloc.h
minors.h
mixer_oss.h ALSA: Use IS_ENABLED() in common headers 2017-05-17 07:13:04 +02:00
mpu401.h
omap-hdmi-audio.h drm: omapdrm: hdmi: Pass HDMI core version as integer to HDMI audio 2017-08-16 12:52:41 +03:00
omap-pcm.h
opl3.h ALSA: seq: Allow the tristate build of OSS emulation 2017-06-09 22:09:45 +02:00
opl4.h
pcm-indirect.h ALSA: pcm: Fix negative appl_ptr handling in pcm-indirect helpers 2017-05-25 23:34:45 +02:00
pcm.h ALSA: pcm: Add an ioctl to specify the supported protocol version 2017-06-27 13:55:46 +02:00
pcm_drm_eld.h
pcm_iec958.h
pcm_oss.h
pcm_params.h
pt2258.h
pxa2xx-lib.h
rawmidi.h ALSA: Use IS_ENABLED() in common headers 2017-05-17 07:13:04 +02:00
rt286.h
rt298.h
rt5514.h ASoC: rt5514: Add the DMIC initial delay to wait it ready. 2016-10-25 14:25:36 +01:00
rt5640.h
rt5645.h ASoC: rt5645: add inv_jd1_1 flag 2017-06-28 18:33:31 +01:00
rt5651.h
rt5659.h
rt5660.h
rt5663.h ASoC: rt5663: Seprate the DC offset between headphone and headset 2017-08-02 11:20:50 +01:00
rt5665.h treewide: Remove remaining executable attributes from source files 2017-02-25 12:12:50 -08:00
rt5670.h
s3c24xx_uda134x.h
sb.h
sb16_csp.h
seq_device.h
seq_kernel.h
seq_midi_emul.h
seq_midi_event.h
seq_oss.h
seq_oss_legacy.h
seq_virmidi.h ALSA: seq: Fix copy_from_user() call inside lock 2017-10-09 14:10:13 +02:00
sh_dac_audio.h
sh_fsi.h
simple_card.h
simple_card_utils.h ASoC: make clock direction configurable in asoc-simple 2017-09-01 11:34:23 +01:00
snd_wavefront.h ALSA: isa: Constify snd_rawmidi_ops 2017-01-12 12:50:16 +01:00
soc-dai.h ASoC: core: add optional pcm_new callback for DAI driver 2017-01-20 15:16:23 +00:00
soc-dapm.h ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs. 2017-06-30 11:55:20 +01:00
soc-dpcm.h
soc-topology.h ASoC: topology: Allow bespoke configuration post widget creation 2017-06-09 18:46:08 +01:00
soc.h Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2017-09-01 12:12:18 +01:00
soundfont.h
spear_dma.h
spear_spdif.h
sta32x.h
sta350.h
tas2552-plat.h
tas5086.h
tea6330t.h
timer.h
tlv.h
tlv320aic3x.h
tlv320aic32x4.h ASoC: tlv320aic32x4: Add gpio configuration to the codec 2017-07-17 16:22:28 +01:00
tlv320dac33-plat.h
tpa6130a2-plat.h
uda134x.h
uda1380.h
util_mem.h
vx_core.h
wavefront.h
wm0010.h
wm1250-ev1.h
wm2000.h
wm2200.h
wm5100.h
wm8903.h
wm8904.h
wm8955.h
wm8960.h
wm8962.h
wm8993.h
wm8996.h
wm9081.h
wm9090.h
wss.h