Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752956AbbHUJSc (ORCPT ); Fri, 21 Aug 2015 05:18:32 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:47222 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbbHUJSI (ORCPT ); Fri, 21 Aug 2015 05:18:08 -0400 Message-ID: <55D6ECB5.6010708@ti.com> Date: Fri, 21 Aug 2015 12:17:41 +0300 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: =?UTF-8?B?UGFsaSBSb2jDoXI=?= CC: Jean-Christophe Plagniol-Villard , Jyri Sarha , , , , Pavel Machek , Sebastian Reichel , Aaro Koskinen , Tony Lindgren , Nishanth Menon Subject: Re: omapdss: Division by zero in kernel References: <201507241803.42891@pali> <55D6E466.5060706@ti.com> <20150821084807.GD27391@pali> In-Reply-To: <20150821084807.GD27391@pali> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EAGKAipAvqRcWFEjknQUX6SoFgRrptc4F" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3297 Lines: 98 --EAGKAipAvqRcWFEjknQUX6SoFgRrptc4F Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 21/08/15 11:48, Pali Roh=C3=A1r wrote: > On Friday 21 August 2015 11:42:14 Tomi Valkeinen wrote: >> >> >> On 24/07/15 19:03, Pali Roh=C3=A1r wrote: >>> Hello, >>> >>> when on N900 (real HW or qemu) I run this command >>> >>> / # echo 0 > /sys/devices/platform/omapdss/overlay0/enabled && echo 0= > /sys/class/graphics/fb0/size >>> >>> then kernel crash with this error message >>> >>> / # [ 29.904113] Division by zero in kernel. >> >=20 > Hi! Thanks for explaining. >=20 >> The problem is that fb console uses the kernel mmapped framebuffer, bu= t >> omapfb is not aware of the fb console. So the above commands free the >> framebuffer, as omapfb thinks no one is using it, and then fb console >> tries to touch the fb. >> >=20 > What about refusing those calls from fb console? So fb console will not= > know about this problem and omapfb will just ignore drawn functions? Hmm, I'm not sure I understand what you mean... omapfb is not drawing anything, fbcon is doing the drawing independently to the fb. And the fb suddenly disappears without fbcon realizing that. >> omapfb tracks mmaps from userspace, and refuses to free a fb it it's >> mmapped. >> >> I don't know how to fix it straight away. Maybe there's a way for omap= fb >> to check if the fbcon uses the fb in question, and if so, refuses to >> release/resize the memory. >> >> Tomi >> >=20 > Maemo userspace (on Nokia N900) uses above commands to initialize > graphic and Xserver. So it would be nice if disabling framebuffer would= > work even if fbcon.ko is loaded (or compiled directly into zImage). Ok. And N900 has fbcon enabled? I wonder how it survives... fbcon can be unbound from userspace with something like: echo 0 > /sys/class/vtconsole/vtcon1/bind After that I think the memory can be freed. But obviously the kernel should not crash here, no question about that. Tomi --EAGKAipAvqRcWFEjknQUX6SoFgRrptc4F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJV1uy1AAoJEPo9qoy8lh717mMQAJIr6z9Om0WWHyoda6FEF5Se ynBZ1wGX8atx8lcFMwLJl8KJHFVfQe3krwVaPh13b4tj4PRFiIh3Al7+HqezO1Ku 7c6/nPRvhNFHBm71OtDR4lcsIGcrVQfyvZzT0tF4EVI9zumu8xcJ+tSL59CE+bKx 5pT7p6SwdzXVZp/KRGXuJ/qBAjQnQCLGJAKDfCgkxvoLuW4FCockSRlCbbacMut6 H2P4dGhn+ILTrO3JJXJwWaoaug/S/wXi0nH7BjGcNElZvTX8re9ZHCNw/YafDd7O cLeFOhDOzKx4LySEcQmnj0BLOuC89IzuRRTcQMmA9bCAjdkJt7HcXufwFC0eJNrq UDrcgDS9KDLgjlOq6vGEFtwW3SBpnvzQcFwHkVVz6xXSiJKhwGR4fKOuxW/oXmRD N1nvT2f9A90JKIKygBLMNUVLDURJ5fCK5asgEDGDZ2ockRy18JXJz+39WhC1R8ML jfGbRI8sWY9ZpZlki1byPmFbsDHbqydsukx4oGPvaJ2qzfTGc56EjpzKkXcWTXyU cu8NjMnvvuA2J2UvnABAximdB5niTMYhInw3IxwsMKFtJY5+IqpCteRAyivNwJg3 qhOqcBFg+/pizPZZkqHkThgk9ZgOkt+YYXugTYveFNLGQNO0cd/JDNn+cKXhKIWt chRQjhu4p7FJxezwWid6 =gAkY -----END PGP SIGNATURE----- --EAGKAipAvqRcWFEjknQUX6SoFgRrptc4F-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/