On Fri, Feb 08, 2019 at 08:01:03PM +0000, Marcel Ziswiler wrote: > Hi there > > I just stumbled over this one: > > [ 31.026220] Division by zero in kernel. > [ 31.026238] CPU: 1 PID: 529 Comm: X Not tainted 5.0.0-rc5-next- > 20190208-dirty #153 > [ 31.026244] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) > [ 31.026281] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 31.026301] [] (show_stack) from [] > (dump_stack+0xb4/0xc8) > [ 31.026317] [] (dump_stack) from [] > (Ldiv0+0x8/0x10) > [ 31.026337] [] (Ldiv0) from [] > (tegra_hdmi_setup_audio+0x1ac/0xed0) > [ 31.026353] [] (tegra_hdmi_setup_audio) from [] > (tegra_hdmi_encoder_enable+0x5ec/0x2a20) > [ 31.026379] [] (tegra_hdmi_encoder_enable) from > [] (drm_atomic_helper_commit_modeset_enables+0x10c/0x220) > [ 31.026397] [] (drm_atomic_helper_commit_modeset_enables) > from [] (drm_atomic_helper_commit_tail_rpm+0x24/0x6c) > [ 31.026412] [] (drm_atomic_helper_commit_tail_rpm) from > [] (commit_tail+0x40/0x6c) > [ 31.026427] [] (commit_tail) from [] > (drm_atomic_helper_commit+0xbc/0x128) > [ 31.026443] [] (drm_atomic_helper_commit) from > [] (restore_fbdev_mode_atomic+0x160/0x1cc) > [ 31.026457] [] (restore_fbdev_mode_atomic) from > [] (drm_fb_helper_pan_display+0xc4/0x1d0) > [ 31.026481] [] (drm_fb_helper_pan_display) from > [] (fb_pan_display+0x9c/0x118) > [ 31.026498] [] (fb_pan_display) from [] > (do_fb_ioctl+0x4b0/0x7cc) > [ 31.026514] [] (do_fb_ioctl) from [] > (do_vfs_ioctl+0xac/0x8f8) > [ 31.026527] [] (do_vfs_ioctl) from [] > (ksys_ioctl+0x34/0x60) > [ 31.026540] [] (ksys_ioctl) from [] > (ret_fast_syscall+0x0/0x54) > [ 31.026546] Exception stack(0xcba59fa8 to 0xcba59ff0) > [ 31.026559] 9fa0: 001527a8 00152278 0000000a > 00004606 00152808 00000000 > [ 31.026572] 9fc0: 001527a8 00152278 0015b368 00000036 b6f20961 > 0000000a bedb5dd4 00000000 > [ 31.026581] 9fe0: b6af7098 bedb5b1c b6af4603 b6cdb67c > [ 31.026586] Division by zero in kernel. > [ 31.026595] CPU: 1 PID: 529 Comm: X Not tainted 5.0.0-rc5-next- > 20190208-dirty #153 > [ 31.026600] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) > [ 31.026615] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 31.026629] [] (show_stack) from [] > (dump_stack+0xb4/0xc8) > [ 31.026640] [] (dump_stack) from [] > (Ldiv0+0x8/0x10) > [ 31.026654] [] (Ldiv0) from [] > (tegra_hdmi_setup_audio+0x200/0xed0) > [ 31.026667] [] (tegra_hdmi_setup_audio) from [] > (tegra_hdmi_encoder_enable+0x5ec/0x2a20) > [ 31.026684] [] (tegra_hdmi_encoder_enable) from > [] (drm_atomic_helper_commit_modeset_enables+0x10c/0x220) > [ 31.026700] [] (drm_atomic_helper_commit_modeset_enables) > from [] (drm_atomic_helper_commit_tail_rpm+0x24/0x6c) > [ 31.026715] [] (drm_atomic_helper_commit_tail_rpm) from > [] (commit_tail+0x40/0x6c) > [ 31.026729] [] (commit_tail) from [] > (drm_atomic_helper_commit+0xbc/0x128) > [ 31.026743] [] (drm_atomic_helper_commit) from > [] (restore_fbdev_mode_atomic+0x160/0x1cc) > [ 31.026755] [] (restore_fbdev_mode_atomic) from > [] (drm_fb_helper_pan_display+0xc4/0x1d0) > [ 31.026770] [] (drm_fb_helper_pan_display) from > [] (fb_pan_display+0x9c/0x118) > [ 31.026785] [] (fb_pan_display) from [] > (do_fb_ioctl+0x4b0/0x7cc) > [ 31.026797] [] (do_fb_ioctl) from [] > (do_vfs_ioctl+0xac/0x8f8) > [ 31.026809] [] (do_vfs_ioctl) from [] > (ksys_ioctl+0x34/0x60) > [ 31.026820] [] (ksys_ioctl) from [] > (ret_fast_syscall+0x0/0x54) > [ 31.026826] Exception stack(0xcba59fa8 to 0xcba59ff0) > [ 31.026837] 9fa0: 001527a8 00152278 0000000a > 00004606 00152808 00000000 > [ 31.026850] 9fc0: 001527a8 00152278 0015b368 00000036 b6f20961 > 0000000a bedb5dd4 00000000 > [ 31.026859] 9fe0: b6af7098 bedb5b1c b6af4603 b6cdb67c > > This has been observed on a Apalis T30 2GB running todays -next. > > Anybody knowing what is going on before I dig deeper? What exactly was your setup like? I think the only way that this could happen is if the sample_rate variable was 0, and I'm not sure how that could happen. I remember testing this on Beaver without ever seeing a crash, so I don't know what I overlooked. Looking at the code it seems like the only way that it would happen is if the format structure was never initialized, and it seems like it actually is zeroed out and if nobody ever plays audio over HDMI it will remain that way. But that means that HDMI would always crash, and that is definitely not something that I've observed. Can you specify what exactly your test case is and how I can reproduce? Thierry