All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] extcon: Fix kernel hang for find_cable_index_by_name() users
@ 2015-07-06 12:31 ` Roger Quadros
  0 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2015-07-06 12:31 UTC (permalink / raw)
  To: cw00.choi
  Cc: linux-omap, linux-usb, linux-kernel, Roger Quadros,
	Greg Kroah-Hartman

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-06 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 12:31 [PATCH] extcon: Fix kernel hang for find_cable_index_by_name() users Roger Quadros
2015-07-06 12:31 ` Roger Quadros
2015-07-06 13:38 ` Roger Quadros
2015-07-06 13:38   ` Roger Quadros

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.