Another: [PATCH} 2.6 ppc64 rtas crash in kmalloc

Paul Mackerras paulus at samba.org
Sat Jul 24 04:15:11 EST 2004


Linas Vepstas writes:

> The recent set of rtas patches I sent in (about a week ago)
> introduced a bug: the possible use of kmalloc before the
> VM subsystem is initialized.  This patch checks for the VM
> subsystem being ready, and avoids the kmalloc if its not.

> +		/* Can't call kmalloc if VM subsystem is not yet up. */
> +		struct cache_sizes *csizep = malloc_sizes;
> +		if (csizep->cs_cachep) {

Please just use if (mem_init_done) for this, instead of looking at
internal slab cache variables.

Thanks,
Paul.

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list