From: Roger Quadros <rogerq@ti.com>
To: <cw00.choi@samsung.com>
Cc: <linux-omap@vger.kernel.org>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Roger Quadros <rogerq@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] extcon: Fix kernel hang for find_cable_index_by_name() users
Date: Mon, 6 Jul 2015 15:31:29 +0300 [thread overview]
Message-ID: <1436185889-773-1-git-send-email-rogerq@ti.com> (raw)
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 <gregkh@linuxfoundation.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
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)
--
2.1.4
next reply other threads:[~2015-07-06 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 12:31 Roger Quadros [this message]
2015-07-06 13:38 ` Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436185889-773-1-git-send-email-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=cw00.choi@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome