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


Groups > linux.kernel > #1598200

Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free}

From Brian Norris <briannorris@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free}
Date 2017-03-11 01:40 +0100
Message-ID <tjDeG-3cL-5@gated-at.bofh.it> (permalink)
References <tiT2a-4ZD-13@gated-at.bofh.it> <tiU7T-5GA-3@gated-at.bofh.it> <tiU7T-5GA-1@gated-at.bofh.it> <tjDeG-3cL-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Kuninori,

On Thu, Mar 09, 2017 at 12:53:50AM +0000, Kuninori Morimoto wrote:
> > All I know is that I'm definitely hitting a NULL
> > platform->driver->pcm_new callback, and that either reverting your patch
> > or applying the patch I just sent fixes it.
> 
> I want to know why this happen.
> Can you show me which driver is calling snd_soc_add_platform() in your case ?

There are 4 drivers calling that:

  snd_soc_dummy_probe
  rt5514_spi_probe
  2 instances of snd_dmaengine_pcm_register, via rockchip_i2s_probe

Only the latter two seem to run the assignment here:

	if (platform_drv->pcm_new)
		platform->component.pcm_new = snd_soc_platform_drv_pcm_new;

Both snd_soc_dummy_probe and rt5514_spi_probe find ->pcm_new NULL here.

I'm running with the sound/soc/rockchip/rk3399_gru_sound.c platform
driver. If it helps, I'm using the DT posted at [1]. IIUC, the "RT5514
DSP" link is trying to link up a "snd-soc-dummy" instance.

I'm fairly thoroughly confused. Any better ideas?

Brian

[1] https://www.spinics.net/lists/arm-kernel/msg561964.html
    [PATCH v2 4/6] arm64: dts: rockchip: add Gru/Kevin DTS

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


Thread

[PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris <briannorris@chromium.org> - 2017-03-09 00:20 +0100
  Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris <briannorris@chromium.org> - 2017-03-09 01:30 +0100
    Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris <briannorris@chromium.org> - 2017-03-11 01:40 +0100
      Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris <briannorris@chromium.org> - 2017-03-13 22:50 +0100
  Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Mark Brown <broonie@kernel.org> - 2017-03-09 13:10 +0100
    Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris <briannorris@chromium.org> - 2017-03-11 01:30 +0100
      Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Mark Brown <broonie@kernel.org> - 2017-03-13 14:00 +0100
        Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris <briannorris@chromium.org> - 2017-03-13 23:00 +0100

csiph-web