All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stratos Karafotis <stratosk@semaphore.gr>
To: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org,
	"linux-kernel@vger.kernel.org >> LKML"
	<linux-kernel@vger.kernel.org>
Subject: Re: oops during boot with CONFIG_SND_DYNAMIC_MINORS not set
Date: Fri, 23 Aug 2013 00:56:01 +0300	[thread overview]
Message-ID: <521688F1.1010303@semaphore.gr> (raw)
In-Reply-To: <s5hy57tifnf.wl%tiwai@suse.de>

On 08/23/2013 12:23 AM, Takashi Iwai wrote:
> At Thu, 22 Aug 2013 19:03:44 +0300,
> Stratos Karafotis wrote:
>>
>> On 08/22/2013 10:59 AM, Takashi Iwai wrote:
>>> At Thu, 22 Aug 2013 00:42:41 +0300,
>>> Stratos Karafotis wrote:
>>>>
>>>> Hi,
>>>>
>>>> I get the following oops during boot when build with CONFIG_SND_DYNAMIC_MINORS
>>>> not set (3.11-rc6).
>>>> The issue is vanished building the kernel with CONFIG_SND_DYNAMIC_MINORS=y
>>>> as suggested in printk message.
>>>>
>>>> Regards,
>>>> Stratos
>>>>
>>>>
>>>
>>> Could you check the patch below?
>>> Thanks!
>>>
>>>
>>> Takashi
>>>
>>> ---
>>> From: Takashi Iwai <tiwai@suse.de>
>>> Subject: [PATCH] ALSA: hda - Fix NULL dereference with CONFIG_SND_DYNAMIC_MINORS=n
>>>
>>> Without the dynamic minor assignment, HDMI codec may have less PCM
>>> instances than the number of pins, which eventually leads to Oops.
>>>
>>> Reported-by: Stratos Karafotis <stratosk@semaphore.gr>
>>> Cc: <stable@vger.kernel.org>
>>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>> ---
>>>    sound/pci/hda/patch_hdmi.c | 3 +++
>>>    1 file changed, 3 insertions(+)
>>>
>>> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
>>> index 030ca86..e2cb92b 100644
>>> --- a/sound/pci/hda/patch_hdmi.c
>>> +++ b/sound/pci/hda/patch_hdmi.c
>>> @@ -1781,6 +1781,9 @@ static int generic_hdmi_build_controls(struct hda_codec *codec)
>>>    		struct snd_pcm_chmap *chmap;
>>>    		struct snd_kcontrol *kctl;
>>>    		int i;
>>> +
>>> +		if (pin_idx >= codec->num_pcms)
>>> +			break;
>>>    		err = snd_pcm_add_chmap_ctls(codec->pcm_info[pin_idx].pcm,
>>>    					     SNDRV_PCM_STREAM_PLAYBACK,
>>>    					     NULL, 0, pin_idx, &chmap);
>>>
>>
>> Hi,
>>
>> Unfortunately, still the same problem after applying your patch.
> 
> Bah, it's a wrong one.  The patch below should work better.
> Sorry for inconvenience.

No problem! :)

Yes, no more oops with the latest patch.
Tested with CONFIG_SND_DYNAMIC_MINORS=y and n.

There is an error -16 now (please see below), but I guess it's normal(?)

Thanks,
Stratos


[   16.392453] ALSA sound/pci/hda/hda_codec.c:4506 Too many HDMI devices
[   16.392457] ALSA sound/pci/hda/hda_codec.c:4508 Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y
[   16.392460] ALSA sound/pci/hda/hda_codec.c:4506 Too many HDMI devices
[   16.392461] ALSA sound/pci/hda/hda_codec.c:4508 Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y
[   16.409640] ALSA sound/core/control.c:349 control 0:0:0:HDMI/DP Jack:0 is already present
[   16.410627] hda_codec: cannot build controls for #3 (error -16)
[   16.411683] input: HDA NVidia HDMI/DP as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
[   16.411844] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input16
[   16.411986] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
[   19.682495] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[   21.367420] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   21.420191] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
[   21.847085] type=1305 audit(1377207061.920:3): audit_pid=534 old=0 auid=4294967295 ses=4294967295
 res=1
[   22.164707] alsactl[549]: segfault at 1 ip 00007f6c8ad58a7d sp 00007fff19912de0 error 4 in libc-2.17.so[7f6c8ad10000+1b6000]

  reply	other threads:[~2013-08-22 21:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 21:42 oops during boot with CONFIG_SND_DYNAMIC_MINORS not set Stratos Karafotis
2013-08-22  7:59 ` Takashi Iwai
2013-08-22 16:03   ` Stratos Karafotis
2013-08-22 21:23     ` Takashi Iwai
2013-08-22 21:56       ` Stratos Karafotis [this message]
2013-08-23  8:04         ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=521688F1.1010303@semaphore.gr \
    --to=stratosk@semaphore.gr \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.