Bug 114311

Summary: Double fault at shutdown from nvhdmi_chmap_cea_alloc_validate_get_type
Product: Drivers Reporter: Andreas Reis (andreas.reis)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: high CC: subhransu.s.prusty, tiwai
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: drm-intel-nightly 63461ba4 Subsystem:
Regression: No Bisected commit-id:
Attachments: photo of trace
Fix double fault in nvhdmi_chmap_cea_alloc_validate_get_type

Description Andreas Reis 2016-03-10 18:16:17 UTC
Created attachment 208641 [details]
photo of trace

drm-intel-nightly at 63461ba4 + all newer patches from torvalds (minus drm/sound to 8e0f93c (spi-fix)), thus at 8b13f98 of sound.git (/ALSA: dice: force to add two pcm devices for listed models)

Getting a crash at every shutdown since the day before yesterday. Sometimes it's a panic log so long it instantly flushes the original cause from the screen (and not to disk), sometimes it's just as in the attached photo.

While I thus do not know if there aren't other contributing factors (or crashers), I can say that reverting the last patch (actually I reverted the entire set of seven) that altered nvhdmi_chmap_cea_alloc_validate_get_type (so far) also gets rid of the final crash:

ALSA: hda - Create common chmap object
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=67b90cb84be8fde0e51f71834e15c32fbec08562

Two HDMI monitors attached to my Haswell 4770 (Z87 motherboard with a Creative CA0132 chip, USB mic, one empty DVI-I & another empty DP, and a Nvidia 970 with nothing connected to it for bumblebee).

This does *not* occur on my Haswell 4200U (HM86, IGP only, eDP only/HDMI unconnected).
Comment 1 Takashi Iwai 2016-03-10 19:48:35 UTC
Thanks for the report.  I pinged Intel guys who submitted the chmap patches.
Comment 2 Subhransu 2016-03-11 05:39:05 UTC
Thanks for reporting. Working on to fix this.
Comment 3 Subhransu 2016-03-11 07:37:16 UTC
Created attachment 208681 [details]
Fix double fault in nvhdmi_chmap_cea_alloc_validate_get_type

Found a bug in the nvhdmi_chmap_cea_alloc_validate_get_type function, when moving to chmap object. I have attached a patch which should fix that issue. Can you please validate once with this?
Comment 4 Andreas Reis 2016-03-11 11:08:58 UTC
Looks like works. Thanks.
Comment 5 Takashi Iwai 2016-04-05 13:16:47 UTC
Fixed in the release.