From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Quadros Subject: Re: [PATCH] extcon: Fix kernel hang for find_cable_index_by_name() users Date: Mon, 6 Jul 2015 16:38:48 +0300 Message-ID: <559A84E8.4010109@ti.com> References: <1436185889-773-1-git-send-email-rogerq@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436185889-773-1-git-send-email-rogerq@ti.com> Sender: linux-kernel-owner@vger.kernel.org To: cw00.choi@samsung.com Cc: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman List-Id: linux-omap@vger.kernel.org Hi, On 06/07/15 15:31, Roger Quadros wrote: > Users of find_cable_index_by_name() will cause a kernel hang > as the while loop counter is never incremented and end condition > is never reached. > > Fixes: commit 73b6ecdb93e8 ("extcon: Redefine the unique id of supported external connectors without 'enum extcon' type") > Cc: Greg Kroah-Hartman > Signed-off-by: Roger Quadros Please ignore this patch. The extcon framework is broken bad in v4.2 and this patch is not sufficient to fix it. I will send another patch that fixes the issues that I'm facing in a while. cheers, -roger > --- > drivers/extcon/extcon.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c > index 76157ab..1acc830 100644 > --- a/drivers/extcon/extcon.c > +++ b/drivers/extcon/extcon.c > @@ -138,6 +138,8 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name) > id = i; > break; > } > + > + i++; > } > > if (id == EXTCON_NONE) > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755757AbbGFNi6 (ORCPT ); Mon, 6 Jul 2015 09:38:58 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:35549 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755096AbbGFNi4 (ORCPT ); Mon, 6 Jul 2015 09:38:56 -0400 Message-ID: <559A84E8.4010109@ti.com> Date: Mon, 6 Jul 2015 16:38:48 +0300 From: Roger Quadros User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: CC: , , , Greg Kroah-Hartman Subject: Re: [PATCH] extcon: Fix kernel hang for find_cable_index_by_name() users References: <1436185889-773-1-git-send-email-rogerq@ti.com> In-Reply-To: <1436185889-773-1-git-send-email-rogerq@ti.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 06/07/15 15:31, Roger Quadros wrote: > Users of find_cable_index_by_name() will cause a kernel hang > as the while loop counter is never incremented and end condition > is never reached. > > Fixes: commit 73b6ecdb93e8 ("extcon: Redefine the unique id of supported external connectors without 'enum extcon' type") > Cc: Greg Kroah-Hartman > Signed-off-by: Roger Quadros Please ignore this patch. The extcon framework is broken bad in v4.2 and this patch is not sufficient to fix it. I will send another patch that fixes the issues that I'm facing in a while. cheers, -roger > --- > drivers/extcon/extcon.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c > index 76157ab..1acc830 100644 > --- a/drivers/extcon/extcon.c > +++ b/drivers/extcon/extcon.c > @@ -138,6 +138,8 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name) > id = i; > break; > } > + > + i++; > } > > if (id == EXTCON_NONE) >