* Re: inconsistent reference counting for snd-soc-skl
[not found] <120ab1f8-002d-de8e-358e-f3b486dc1012@sakamocchi.jp>
@ 2016-10-13 13:41 ` Subhransu S. Prusty
2016-10-13 13:54 ` Takashi Sakamoto
0 siblings, 1 reply; 2+ messages in thread
From: Subhransu S. Prusty @ 2016-10-13 13:41 UTC (permalink / raw)
To: Takashi Sakamoto
Cc: alsa-devel, dharageswari.r, vinod.koul, jayachandran.b, broonie,
jeeja.kp
On Thu, Oct 13, 2016 at 10:19:37PM +0900, Takashi Sakamoto wrote:
> Hi,
>
> I find an issue of snd-soc-skl due to inconsistent reference counting.
> See this call graph.
>
> skl_probe()
> ->skl_first_init()
> ->skl_i915_init()
> ->snd_hdac_display_power() (CONFIG_SND_SOC_HDAC_HDMI is enabled)
> ->bus->i915_power_refcount++
> ->all error pathes
> ->skl_free()
> ->snd_hda_i915_exit()
> ->WARN_ON(!bus->i915_power_refcount)
>
> This might be also hit by rmmod(8). I see this bug in kernel 4.8 and
> pre-4.9.
Thanks Takashi for reporting. We will fix this.
Regards,
Subhransu
>
>
> Regards
>
> Takashi Sakamoto
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: inconsistent reference counting for snd-soc-skl
2016-10-13 13:41 ` inconsistent reference counting for snd-soc-skl Subhransu S. Prusty
@ 2016-10-13 13:54 ` Takashi Sakamoto
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Sakamoto @ 2016-10-13 13:54 UTC (permalink / raw)
To: Subhransu S. Prusty
Cc: alsa-devel, dharageswari.r, vinod.koul, jayachandran.b, broonie,
jeeja.kp
Hi,
On Oct 13 2016 22:41, Subhransu S. Prusty wrote:
> On Thu, Oct 13, 2016 at 10:19:37PM +0900, Takashi Sakamoto wrote:
>> Hi,
>>
>> I find an issue of snd-soc-skl due to inconsistent reference counting.
>> See this call graph.
>>
>> skl_probe()
>> ->skl_first_init()
>> ->skl_i915_init()
>> ->snd_hdac_display_power() (CONFIG_SND_SOC_HDAC_HDMI is enabled)
>> ->bus->i915_power_refcount++
>> ->all error pathes
>> ->skl_free()
>> ->snd_hda_i915_exit()
>> ->WARN_ON(!bus->i915_power_refcount)
>>
>> This might be also hit by rmmod(8). I see this bug in kernel 4.8 and
>> pre-4.9.
>
> Thanks Takashi for reporting. We will fix this.
Thanks for the quick reply.
I'd like to correct the explanation. In last half of skl_probe(), the
reference count is decremented.
http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/soc/intel/skylake/skl.c#n719
So this issue may occur on error paths between call of skl_first_init()
and the part.
Takashi Sakamoto
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-13 13:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <120ab1f8-002d-de8e-358e-f3b486dc1012@sakamocchi.jp>
2016-10-13 13:41 ` inconsistent reference counting for snd-soc-skl Subhransu S. Prusty
2016-10-13 13:54 ` Takashi Sakamoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.