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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 08 Dec 2011 15:08:49 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Axel Lin <axel.lin@...il.com>
CC:	linux-kernel@...r.kernel.org,
	Anton Vorontsov <cbouatmailru@...il.com>
Subject: Re: [PATCH 2/2] jz4740-battery: fix signedness bug

On 12/08/2011 02:05 PM, Axel Lin wrote:
> wait_for_completion_interruptible_timeout() may return negative value.
> In this case, checking if (t > 0)  will return true if t is unsigned.
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>

Acked-by: Lars-Peter Clausen <lars@...afoo.de>

Thanks


> ---
>  drivers/power/jz4740-battery.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c
> index 763f894..5bb1ddd 100644
> --- a/drivers/power/jz4740-battery.c
> +++ b/drivers/power/jz4740-battery.c
> @@ -67,7 +67,7 @@ static irqreturn_t jz_battery_irq_handler(int irq, void *devid)
>  
>  static long jz_battery_read_voltage(struct jz_battery *battery)
>  {
> -	unsigned long t;
> +	long t;
>  	unsigned long val;
>  	long voltage;
>  

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ