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]
Message-Id: <20070514171518.fdca9f8c.akpm@linux-foundation.org>
Date:	Mon, 14 May 2007 17:15:18 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Christoph Lameter <clameter@....com>
Cc:	mroos@...ux.ee, David Miller <davem@...emloft.net>,
	sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: slab hang on boot

On Mon, 14 May 2007 16:46:17 -0700 (PDT)
Christoph Lameter <clameter@....com> wrote:

> -#define KMALLOC_SHIFT_HIGH 25
> +#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) =< 25 ? \
> +				MAX_ORDER + PAGE_SHIFT - 1 : 25)

Would prefer to see a lot more parentheses in there.  Who knows what the arch
is using for MAX_ORDER and PAGE_SHIFT.

>  #if !defined(CONFIG_MMU) || NR_CPUS > 512 || MAX_NUMNODES > 256
>  #define KMALLOC_SHIFT_HIGH 20
> @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size
>  	 */
>  	WARN_ON_ONCE(size == 0);
>  
> +	if (size >= (1UL << KMALLOC_SHIFT_HIGH))
> +		return -1;
> +

`size' is `int'.  Deliberately comparing it to an unsigned long seems
unpointful.

Arguably, `size' should be size_t.
-
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