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]
Message-ID: <1297054827.1444.2.camel@leonhard>
Date:	Mon, 07 Feb 2011 14:00:27 +0900
From:	Namhyung Kim <namhyung@...il.com>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH] memblock: Fix error path in memblock_add_region()

2011-02-06 (일), 09:46 -0800, Yinghai Lu:
> we can skip the restoring.
> 
> Thanks
> 
> Yinghai
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index bdba245..3231657 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -374,13 +374,9 @@ static long __init_memblock memblock_add_region(struct memblock_type *type, phys
>  	}
>  	type->cnt++;
>  
> -	/* The array is full ? Try to resize it. If that fails, we undo
> -	 * our allocation and return an error
> -	 */
> -	if (type->cnt == type->max && memblock_double_array(type)) {
> -		type->cnt--;
> +	/* The array is full ? Try to resize it  */
> +	if (type->cnt == type->max && memblock_double_array(type))
>  		return -1;
> -	}
>  
>  	return 0;
>  }

Looks OK to me, too.
Thanks.


-- 
Regards,
Namhyung Kim


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