From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [REGRESSION] drm/tegra: hdmi: tegra_hdmi_setup_audio: division by zero in kernel Date: Mon, 11 Feb 2019 09:00:08 +0100 Message-ID: <20190211080007.GA923@ulmo> References: <87f8fd40b25e2842b547059a8d28295533e8c09c.camel@toradex.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8222620694557647825==" Return-path: In-Reply-To: <87f8fd40b25e2842b547059a8d28295533e8c09c.camel@toradex.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Marcel Ziswiler Cc: "linux-tegra@vger.kernel.org" , "alban.bedel@avionic-design.de" , "linux-arm-kernel@lists.infradead.org" List-Id: linux-tegra@vger.kernel.org --===============8222620694557647825== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 08, 2019 at 08:01:03PM +0000, Marcel Ziswiler wrote: > Hi there >=20 > I just stumbled over this one: >=20 > [ 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 >=20 > This has been observed on a Apalis T30 2GB running todays -next. >=20 > 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 --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlxhK4MACgkQ3SOs138+ s6FX9Q/+OutA5S721H/nvoBN3mODpLMoFz1mRX6ie8cInENSpgwqYg1RDNrcsfNR kePDAYzTdbWIzp8m0zNRqmckeSWlYFxZiNj5CSWMZHMShdGTUJ62CV/V5IZLFqsT nKCXKW7l95SUuMznVk771Klv8GPA3RnIE1MlxyGWiaB9fE6bi00GbyEvlXJziC6d EUGGupUlk2P+FbD3z+pTt7fGiAtZb7LyyBpzKiyhutJMP7KXZZphbKh0AehW6/wH ZJefYU3VjB1Ew9OxjTvspISxQWNDOjrZlWwtpIGhpHm79XNwJUfDD4pk+iY09XFD p1qUyVxA6m10DpTOopwK41sbdP/Cs8b3VtTYMUoyvh+8igU8vyBRp/EZeJ5d4dtP NDY4Af7YbjHmF38mL/NpbxFDXbGdfszVFtpoM2DczH0S0S+yM+Woor15IHXYmoX8 SDZ4Xv5ypI+qy97OYb354WVizQg5oGoiMCaVITrr4d9OAmeSx9JcPQOf3p3mEp0I 4xWwwhGVxhEsFYZZnqW7lzOr/PE9g+Dem2yZz7TKb5+Gqhl7P39dsXlkBuxc11yf ALBBSI3pP0E7/MoWM7LUm/NGoN31X33k5Svd1V8OOfS0IfWy/zy5cdXf+Y0h4Yns 6FZLp4Zxa4cads0O7LhJnPjrY5FLX+q3SqrWM5nZpQiI7IQ9CPA= =BxOo -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND-- --===============8222620694557647825== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8222620694557647825==--