From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: Re: [PATCH] usb: phy: msm: fix error handling in probe. Date: Wed, 13 Jan 2016 01:41:41 -0600 Message-ID: <8760yyhqoa.fsf@ti.com> References: <1452593376-7163-1-git-send-email-srinivas.kandagatla@linaro.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from mail-ob0-f176.google.com ([209.85.214.176]:35122 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbcAMHlt (ORCPT ); Wed, 13 Jan 2016 02:41:49 -0500 In-Reply-To: <1452593376-7163-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Felipe Balbi , linux-usb@vger.kernel.org Cc: tim.bird@sonymobile.com, linux-arm-msm@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, ivan.ivanov@linaro.org, Srinivas Kandagatla --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Srinivas Kandagatla writes: > This driver registers for extcon events as part of its probe, but > never unregisters them in case of error in the probe path. > > There were multiple issues noticed due to this missing error handling. > One of them is random crashes if the regulators are not ready yet by the > time probe is invoked. > > Ivan's previous attempt [1] to fix this issue, did not really address > all the failure cases like regualtor failures. > > [1] https://lkml.org/lkml/2015/9/7/62 > > Without this patch the kernel would carsh with log: > ... > Unable to handle kernel paging request at virtual address 17d78410 > pgd =3D ffffffc001a5c000 > [17d78410] *pgd=3D00000000b6806003, *pud=3D00000000b6806003, *pmd=3D00000= 00000000000 > Internal error: Oops: 96000005 [#1] PREEMPT SMP > Modules linked in: > CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.4.0+ #48 > Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) > Workqueue: deferwq deferred_probe_work_func > task: ffffffc03686e900 ti: ffffffc0368b0000 task.ti: ffffffc0368b0000 > PC is at raw_notifier_chain_register+0x1c/0x44 > LR is at extcon_register_notifier+0x88/0xc8 > pc : [] lr : [] pstate: 80000085 > sp : ffffffc0368b3a70 > x29: ffffffc0368b3a70 x28: ffffffc03680c310 > x27: ffffffc035518000 x26: ffffffc035518000 > x25: ffffffc03bfa20e0 x24: ffffffc035580a18 > x23: 0000000000000000 x22: ffffffc035518458 > x21: ffffffc0355e9a60 x20: ffffffc035518000 > x19: 0000000000000000 x18: 0000000000000028 > x17: 0000000000000003 x16: ffffffc0018153c8 > x15: 0000000000000001 x14: ffffffc03686f0f8 > x13: ffffffc03686f0f8 x12: 0000000000000003 > x11: 0000000000000001 x10: 0000000000000001 > x9 : ffffffc03686f0f8 x8 : 0000e3872014c1a1 > x7 : 0000000000000028 x6 : 0000000000000000 > x5 : 0000000000000001 x4 : 0000000000000000 > x3 : 00000000354fb170 x2 : 0000000017d78400 > x1 : ffffffc0355e9a60 x0 : ffffffc0354fb268 > you need to "blame" a commit with: Fixes: First-12-characters-of-commit-hash ("commit subject line") and if the failing commit sits in a released kernel, you also need to add: Cc: # vX.Y =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWlf+2AAoJEIaOsuA1yqREuXMP/RAPb5r1P7Z+GrO0GzYI0dKb cG5T4MpV0iv9+PIS1DXuGORZCZSkIz0PrGZ5Jzl5xKNN4Rzs+qL1ES5MGdqyKpFV iakl7KzQVmM5U8mHPkgjvKqViVzWp4/H0+SDQbdPsmCrd67/dr6Udp8uWAa1R6R5 ODeTzdtb4kIK0Xjs5qS+geJ3eAjgmq6+TkbozVTqCm9+AlLUV/HjlYU3ZPgJskmk VFI+fbWCqwjXVA2kWI3LDIG+th8eu3GJtDT0VBKCrr/UOzrl3EsuYHqT1VCNKcBJ +TXr6f/uWDsQtGK0eURBXgDlxWgC0279G281u3VHtyRJjfdtjsknzGvAWTs84vXt vkx8bai0MW/a9Nj8hhYccBeYQY1Z3N3Uw20WwBtKoxj6OZ6+LD+Ci5OVE/rEIynL MDbuz8E0le1XASlYRmKfWYG7dMWdJvB/398rrCqbMN44D+B/IzeH3jq0ra0TFjMR EYVL6fwML4uVql0Cmkqo62VRIAuDOWB+9aWwWLZ0e0YpT0WFXCqrnKi/X3kMiN/G 8J9vssnk7IWWISAMSfK4DbDaJg1CALaa5aVi+j9esrCqlIMpqQDk0eVRLw2sXyyn KNjs03G0xST5paLI2pPrWl7vrsgwEvzQnR5dq5mbF1LBMHMqQXDniCSlZCkNehPv t+t9GqGasL+ZZuBfTGS+ =0Nwg -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754775AbcAMHlw (ORCPT ); Wed, 13 Jan 2016 02:41:52 -0500 Received: from mail-ob0-f176.google.com ([209.85.214.176]:35122 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbcAMHlt (ORCPT ); Wed, 13 Jan 2016 02:41:49 -0500 From: Felipe Balbi To: Srinivas Kandagatla , Felipe Balbi , linux-usb@vger.kernel.org Cc: tim.bird@sonymobile.com, linux-arm-msm@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, ivan.ivanov@linaro.org, Srinivas Kandagatla Subject: Re: [PATCH] usb: phy: msm: fix error handling in probe. In-Reply-To: <1452593376-7163-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1452593376-7163-1-git-send-email-srinivas.kandagatla@linaro.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/25.0.50.3 (x86_64-pc-linux-gnu) Date: Wed, 13 Jan 2016 01:41:41 -0600 Message-ID: <8760yyhqoa.fsf@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Srinivas Kandagatla writes: > This driver registers for extcon events as part of its probe, but > never unregisters them in case of error in the probe path. > > There were multiple issues noticed due to this missing error handling. > One of them is random crashes if the regulators are not ready yet by the > time probe is invoked. > > Ivan's previous attempt [1] to fix this issue, did not really address > all the failure cases like regualtor failures. > > [1] https://lkml.org/lkml/2015/9/7/62 > > Without this patch the kernel would carsh with log: > ... > Unable to handle kernel paging request at virtual address 17d78410 > pgd =3D ffffffc001a5c000 > [17d78410] *pgd=3D00000000b6806003, *pud=3D00000000b6806003, *pmd=3D00000= 00000000000 > Internal error: Oops: 96000005 [#1] PREEMPT SMP > Modules linked in: > CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.4.0+ #48 > Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) > Workqueue: deferwq deferred_probe_work_func > task: ffffffc03686e900 ti: ffffffc0368b0000 task.ti: ffffffc0368b0000 > PC is at raw_notifier_chain_register+0x1c/0x44 > LR is at extcon_register_notifier+0x88/0xc8 > pc : [] lr : [] pstate: 80000085 > sp : ffffffc0368b3a70 > x29: ffffffc0368b3a70 x28: ffffffc03680c310 > x27: ffffffc035518000 x26: ffffffc035518000 > x25: ffffffc03bfa20e0 x24: ffffffc035580a18 > x23: 0000000000000000 x22: ffffffc035518458 > x21: ffffffc0355e9a60 x20: ffffffc035518000 > x19: 0000000000000000 x18: 0000000000000028 > x17: 0000000000000003 x16: ffffffc0018153c8 > x15: 0000000000000001 x14: ffffffc03686f0f8 > x13: ffffffc03686f0f8 x12: 0000000000000003 > x11: 0000000000000001 x10: 0000000000000001 > x9 : ffffffc03686f0f8 x8 : 0000e3872014c1a1 > x7 : 0000000000000028 x6 : 0000000000000000 > x5 : 0000000000000001 x4 : 0000000000000000 > x3 : 00000000354fb170 x2 : 0000000017d78400 > x1 : ffffffc0355e9a60 x0 : ffffffc0354fb268 > you need to "blame" a commit with: Fixes: First-12-characters-of-commit-hash ("commit subject line") and if the failing commit sits in a released kernel, you also need to add: Cc: # vX.Y =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWlf+2AAoJEIaOsuA1yqREuXMP/RAPb5r1P7Z+GrO0GzYI0dKb cG5T4MpV0iv9+PIS1DXuGORZCZSkIz0PrGZ5Jzl5xKNN4Rzs+qL1ES5MGdqyKpFV iakl7KzQVmM5U8mHPkgjvKqViVzWp4/H0+SDQbdPsmCrd67/dr6Udp8uWAa1R6R5 ODeTzdtb4kIK0Xjs5qS+geJ3eAjgmq6+TkbozVTqCm9+AlLUV/HjlYU3ZPgJskmk VFI+fbWCqwjXVA2kWI3LDIG+th8eu3GJtDT0VBKCrr/UOzrl3EsuYHqT1VCNKcBJ +TXr6f/uWDsQtGK0eURBXgDlxWgC0279G281u3VHtyRJjfdtjsknzGvAWTs84vXt vkx8bai0MW/a9Nj8hhYccBeYQY1Z3N3Uw20WwBtKoxj6OZ6+LD+Ci5OVE/rEIynL MDbuz8E0le1XASlYRmKfWYG7dMWdJvB/398rrCqbMN44D+B/IzeH3jq0ra0TFjMR EYVL6fwML4uVql0Cmkqo62VRIAuDOWB+9aWwWLZ0e0YpT0WFXCqrnKi/X3kMiN/G 8J9vssnk7IWWISAMSfK4DbDaJg1CALaa5aVi+j9esrCqlIMpqQDk0eVRLw2sXyyn KNjs03G0xST5paLI2pPrWl7vrsgwEvzQnR5dq5mbF1LBMHMqQXDniCSlZCkNehPv t+t9GqGasL+ZZuBfTGS+ =0Nwg -----END PGP SIGNATURE----- --=-=-=--