lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 10 Aug 2015 12:18:27 -0700
From:	Tim Bird <tim.bird@...ymobile.com>
To:	"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
	"cw00.choi@...sung.com" <cw00.choi@...sung.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tbird20d@...il.com" <tbird20d@...il.com>,
	"Andersson, Björn" 
	<Bjorn.Andersson@...ymobile.com>
Subject: Re: [PATCH] extcon: add index increment in find_cable_index_by_name


Never mind...

This is already fixed by commit be052cc8 in mainline.

Sorry for the noise.
 -- Tim

On 08/10/2015 10:44 AM, Tim Bird wrote:
> This fixes a bug introduced by commit 73b6ecdb93e8 ("extcon: Redefine the
> unique id of supported external connectors without 'enum extcon' type")
> which introduced an infinite loop in find_cable_index_by_name.  That commit
> converted the scan from a for loop to a while, but did not increment
> 'i' anywhere in the loop.  If the loop index is not incremented, the
> function never exits.
> 
> This function can never work correctly without this fix.
> 
> Signed-off-by: Tim Bird <tim.bird@...ymobile.com>
> ---
>  drivers/extcon/extcon.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index dda1e62..734a9b1 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -138,6 +138,7 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
>  			id = i;
>  			break;
>  		}
> +		i++;
>  	}
>  
>  	if (id == EXTCON_NONE)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists