linux_dsm_epyc7002/sound/soc
Nicolin Chen 8053f21675 ASoC: dapm: Add a dummy snd_pcm_runtime to avoid NULL pointer access
The SND_SOC_DAPM_PRE_PMU case would call startup()/hw_params() that
might access substream->runtime through other functions.

For example:

Unable to handle kernel NULL pointer dereference at virtual address
[....]
PC is at snd_pcm_hw_rule_add+0x24/0x1b0
LR is at snd_pcm_hw_constraint_list+0x20/0x28
[....]
Process arecord (pid: 424, stack limit = 0xffffffc1ecaf0020)
Call trace:
[<ffffffc00086be68>] snd_pcm_hw_rule_add+0x24/0x1b0
[<ffffffc00086c014>] snd_pcm_hw_constraint_list+0x20/0x28
[<ffffffc0008b47a4>] cs53l30_pcm_startup+0x24/0x30
[<ffffffc0008a6260>] snd_soc_dai_link_event+0x290/0x354
[<ffffffc0008a7528>] dapm_seq_check_event.isra.31+0x134/0x2c8
[<ffffffc0008a7768>] dapm_seq_run_coalesced+0x94/0x1c8
[<ffffffc0008a7940>] dapm_seq_run+0xa4/0x404
[<ffffffc0008a8bac>] dapm_power_widgets+0x524/0x984
[<ffffffc0008ab1c4>] snd_soc_dapm_stream_event+0x8c/0xa8
[<ffffffc0008ac7f4>] soc_pcm_prepare+0x10c/0x1ec
[<ffffffc000865b9c>] snd_pcm_do_prepare+0x1c/0x38
[<ffffffc000865600>] snd_pcm_action_single+0x40/0x88
[<ffffffc0008656b8>] snd_pcm_action_nonatomic+0x70/0x90
[<ffffffc000868d28>] snd_pcm_common_ioctl1+0xb6c/0xdd8
[<ffffffc000869508>] snd_pcm_capture_ioctl1+0x200/0x334
[<ffffffc00086a084>] snd_pcm_ioctl_compat+0x648/0x95c
[<ffffffc0001ff4b4>] compat_SyS_ioctl+0xac/0xfc4
[<ffffffc000084cf0>] el0_svc_naked+0x24/0x28
---[ end trace 0dc4f99c2759c35c ]---

So this patch adds a dummy runtime for the original dummy substream
to merely avoid the NULL pointer access.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-27 18:59:45 +01:00
..
adi
amd ASoC: AMD: free memory on error 2016-01-13 12:32:04 +00:00
atmel ASoC: atmel_ssc_dai: Fix DMA params for different SSC 2016-07-07 12:00:07 +02:00
au1x ASoC: au1x: use correct format specifier 2016-04-13 06:39:36 +01:00
bcm ASoC: cygnus: Add Cygnus audio DMA driver 2016-05-31 17:50:42 +01:00
blackfin ASoC: blackfin: Convert to devm_snd_soc_register_card 2015-09-14 18:32:58 +01:00
cirrus
codecs Merge remote-tracking branches 'asoc/topic/wm8753' and 'asoc/topic/wm8985' into asoc-next 2016-07-24 22:07:48 +01:00
davinci ASoC: davinci-mcasp: Use a copy of pdata per instance during DT boot 2016-06-02 10:58:19 +01:00
dwc SoC: dwc: trivial fix of spelling mistake "unsuppted" -> "unsupported" 2016-06-26 02:18:52 +01:00
fsl Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/hdmi', 'asoc/topic/maintainers' and 'asoc/topic/max8960' into asoc-next 2016-07-24 22:07:35 +01:00
generic ASoC: simple-card: use asoc_simple_card_parse_card_name() 2016-07-16 13:03:04 +01:00
img ASoC: img: Add driver for Pistachio internal DAC 2015-12-12 22:56:35 +00:00
intel Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2016-07-24 22:07:22 +01:00
jz4740 ASoC: jz4740: Fix module autoload for OF platform driver 2015-09-14 18:46:14 +01:00
kirkwood ASoC: kirkwood: fix build failure 2016-05-23 17:50:51 +01:00
mediatek ASoC: mediatek: Add HDMI dai-links to the mt8173-rt5650 machine driver 2016-07-14 17:31:18 +01:00
mxs Merge remote-tracking branches 'asoc/topic/max98926', 'asoc/topic/mtk', 'asoc/topic/mxs-saif', 'asoc/topic/nau8825' and 'asoc/topic/omap' into asoc-next 2016-03-13 15:17:18 +07:00
nuc900 dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
omap Merge remote-tracking branches 'asoc/topic/tas571x', 'asoc/topic/tlv320aic31xx', 'asoc/topic/tpa6130a2', 'asoc/topic/twl6040' and 'asoc/topic/wm8731' into asoc-next 2016-07-24 22:07:46 +01:00
pxa ASoC: pxa: Fix module autoload for platform drivers 2016-05-06 17:42:28 +01:00
qcom remove lots of IS_ERR_VALUE abuses 2016-05-27 15:26:11 -07:00
rockchip ASoC: rockchip: correct the spdif clk 2016-07-18 15:38:28 +01:00
samsung ASoC: samsung: Specify DMA channels through struct snd_dmaengine_pcm_config 2016-07-21 19:18:17 +01:00
sh Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/rcar' and 'asoc/topic/rockchip' into asoc-next 2016-07-24 22:07:40 +01:00
sirf
spear ASoC: SPEAr: Make SND_SPEAR_SOC select SND_SOC_GENERIC_DMAENGINE_PCM 2015-09-16 17:46:11 +01:00
sti ASoC: sti: fix return value check in uni_player_parse_dt_audio_glue() 2016-06-13 16:37:19 +01:00
sunxi ASoC: sunxi: remove redundant dev_err call in sun4i_i2s_probe() 2016-07-04 17:28:30 +02:00
tegra Merge remote-tracking branches 'asoc/topic/tegra', 'asoc/topic/topology', 'asoc/topic/wm8903' and 'asoc/topic/wm8904' into asoc-next 2015-12-23 00:23:52 +00:00
txx9
ux500 Merge branch 'topic/hw-constraint-single' into for-next 2015-10-23 06:57:50 +02:00
xtensa
zte Merge remote-tracking branches 'asoc/topic/wm8996', 'asoc/topic/xtensa' and 'asoc/topic/zx296702' into asoc-next 2015-08-30 15:59:18 +01:00
Kconfig ALSA: jack: Allow building the jack layer without input device 2016-02-23 09:03:07 +01:00
Makefile Merge remote-tracking branches 'asoc/topic/adsp' and 'asoc/topic/amd' into asoc-next 2016-01-11 13:54:32 +00:00
soc-ac97.c ASoC: ac97: use gpiochip data pointer 2016-04-26 15:36:57 +02:00
soc-cache.c
soc-compress.c ASoC: compress: Pass error out of soc_compr_pointer 2016-06-22 16:16:02 +01:00
soc-core.c ASoC: Add kerneldoc comments for snd_soc_find_dai 2016-04-22 10:42:03 +01:00
soc-dapm.c ASoC: dapm: Add a dummy snd_pcm_runtime to avoid NULL pointer access 2016-07-27 18:59:45 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine_pcm: Add support for packed transfers 2016-04-27 17:34:11 +01:00
soc-io.c
soc-jack.c
soc-ops.c Merge remote-tracking branches 'asoc/topic/kcontrol', 'asoc/topic/max98357a' and 'asoc/topic/mtk' into asoc-next 2015-12-23 00:23:44 +00:00
soc-pcm.c ASoC: dpcm: play nice with CODEC<->CODEC links 2016-05-30 16:15:10 +01:00
soc-topology.c ASoC: topology: Fix memory leak in widget creation 2016-05-05 16:46:29 +01:00
soc-utils.c ASoC: Document snd-soc-dummy-dai purpose 2015-08-31 16:40:26 +01:00